Commit Graph

2931 Commits

Author SHA1 Message Date
unknown
43f58c990a libCom: Only delete a timer queue when its ref count is 0.
Fixes lp:786979
2011-06-01 16:27:18 -05:00
Andrew Johnson
c71093f47f libCom/iocsh: Oops, allow NULL pathname. 2011-04-26 15:18:30 -05:00
Andrew Johnson
c11a31f549 libCom/iocsh: Set IOCSH_STARTUP_SCRIPT env var. 2011-04-26 14:57:26 -05:00
Michael Davidsaver
2949f6650e errlog: Flush messages before exit
When an exit is requested process all messages before exiting.

The atExit flag is set, so no new messages can be added to the buffer.
2011-04-12 18:12:52 -05:00
Andrew Johnson
8418aa059a libCom/test: Suppress g++ build warnings from epicsCalcTest
Newer versions of gcc support #pragma GCC diagnostic
2011-04-07 17:25:02 -05:00
Andrew Johnson
038ac0cd38 Fix some build issues with old Solaris C++ compiler.
src/libCom/test/epicsExceptionTest.cpp:
  exThread needs a destructor

src/cas/generic/st/casStreamOS.cc:
  Can't use inline as armSend already called
2011-04-05 16:08:49 -05:00
Andrew Johnson
8dea585dc2 FreeBSD update to osdSock.h from Gerrit Kuehn. 2011-04-05 12:32:39 -05:00
Jeff Hill
0dab032751 avoid c++ static initialization order issues 2011-04-05 09:23:22 -06:00
Jeff Hill
4b780b1011 avoid c++ static initialization order issues 2011-04-04 17:50:49 -06:00
Jeff Hill
fc3e876d57 avoid c++ static initialization order issues 2011-04-04 17:29:51 -06:00
Andrew Johnson
f4528ff5e1 libCom: Fix msgbufGetNode() in errlog.c
Systems that generate large numbers of errlog messages or have a slow
message listener could overwrite older messages in the message buffer
after the buffer wraps.  This also corrects and annotates the test
code to describe what's being checked.
2011-03-01 15:03:33 -06:00
Jeff Hill
fd72cb63bf libCom/WIN32: Merged Jeff's fix for bug 717252
o Fixed race condition where win32 thread parm was not pushed onto the
  list before the thread was started, and so if the thread exits very
  quickly it can try to remove a non-existent thread parameter from
  the list.
o This impacts only win32.
2011-02-11 16:33:58 -06:00
Andrew Johnson
c698853394 libCom: Merged Jeff's epicsThread change.
When finished waiting for a thread to exit, signal the event in case
other threads are waiting also.
2011-02-11 15:04:04 -06:00
Andrew Johnson
22f1e8201f libCom/WIN32: Merged Jeff's WIN32/osdThread changes
Fixed spelling and other cosmetic changes.
2011-02-11 15:01:39 -06:00
Andrew Johnson
b38127450e libCom/WIN32: Merged Jeff's osdTime fix
Fixed last time compare in PLL drift factor update loop.
2011-02-11 14:59:35 -06:00
Jeff Hill
5a11866431 when finished waiting for a thread to exit, signal the event in case other threads are waiting also 2011-01-14 18:01:53 -07:00
Jeff Hill
253036c36c o committing merge of r3.14 trunk change
o fixed spelling and other cosmetic changes
2011-01-14 18:00:02 -07:00
Jeff Hill
793639f4da fixed last time compare in PLL drift factor update loop 2011-01-14 17:56:49 -07:00
Michael Davidsaver
6170dc9406 libCom: Fix errlogPrintf() assert fail at shutdown
If errlogPrintf() gets called during shutdown, it can cause a
recursive assert failure.

Fixes lp:693534
2011-01-07 10:24:31 -06:00
Andrew Johnson
c503a03f37 libCom/errlog: Clean up possible problem at shutdown.
Don't use epicsMutexMustLock() in msgbufGetFree().
When we're shutting down, the pvtData.msgQueueLock gets destroyed.
This makes msgbufGetFree() return NULL if the lock is dead.
The epicsMutexMustLock() routine asserts(), which recurses...
2010-11-15 15:46:40 -06:00
Andrew Johnson
2477bf52e6 libCom: Cygwin socket unblocking again...
It helps to include the cygwin header file that
actually has the version number in it...
2010-11-04 14:24:13 -05:00
Andrew Johnson
e7179fc289 libCom: Fix cygwin socket shutdown issue.
Cygwin 1.7 changed the socket shutdown method from BothShutdown
to Close. This fix looks at the cygwin version to work out what
value to return from esscimqi().
2010-11-04 13:30:44 -05:00
Jeff Hill
f340b3e153 o removed -O3 from mingw debug builds (so the issues below are reproduced on mingw)
o gnu compiler for windows doesnt support well dll exporting individual functions from a class
in debug builds so I switched to exporting the entire interface class in several places
o fixed several places in ca lib where include of epicsTimer.h wasnt properly ifdef'd so
that it is imported by ca header files
--- these issues were already fixed on cvs main trunk ---
2010-11-04 10:19:54 -06:00
Andrew Johnson
1e6464cdc4 libCom/test: Various improvements.
Made epicsThreadOnceTest more deterministic, replacing an
epicsThreadSleep() with epicsEventMustWait(), and added a diagnostic
message before running the thread recurse test.

Eric added a series of checks to epicsEventTest.cpp which ensure that
epicsEventSignal() only wakes one waiting thread.
2010-10-29 11:58:44 -05:00
Janet Anderson
143fef7508 Modified test for _MINGW and _TIMESPEC_DEFINED. 2010-10-26 16:48:40 -05:00
Janet Anderson
87e670f5ca Added ifdef around timespec definition for MinGW build. 2010-10-26 16:25:30 -05:00
Andrew Johnson
03539b05a4 libCom/test: run epicsMutexTest loops a fixed number of times.
Windows sometimes managed to run an extra loop before this change.
2010-10-26 11:45:13 -05:00
Andrew Johnson
66864fcb23 libCom/osi: More NTP time quality checking.
Reject NTP timespec values before the EPICS epoch.
2010-10-22 17:34:13 -05:00
jba
2957fdcaf7 Changed (DWORD*) to (const ULONG_PTR*) to avoid windows-x64 debug build
error.
2010-10-22 17:08:41 -05:00
Andrew Johnson
f1a00dd667 libCom/osi: Warn if NTP time stops or decreases.
Add warnings if the NTP time provider sees NTP time stopping or going
backwards.  Should never happen, but...
2010-10-20 11:44:48 -05:00
Ralph Lange
3df265103d libcom/osd/rtems: Fix by M. Davidsaver to use an epheremal receiver port for the NTP synchronization. 2010-10-20 10:35:51 -04:00
Andrew Johnson
ed916cd1b3 Delete osf-alpha target (and host) support, no longer working or needed at KEK. 2010-10-14 14:01:40 -05:00
Andrew Johnson
6f8c946d76 libCom: Recognize -pre and -rc in version snapshot. 2010-10-08 15:17:55 -05:00
Andrew Johnson
881d13ac07 Merged the expand-calc-size branch.
This allows calc and calcout record expressions to be up to
79 characters long, and shortens the postfix buffer needed by
introducing integer literals.  Also removes the length limit
for access security CALC expressions.
2010-10-07 14:16:24 -05:00
Andrew Johnson
fbda9f3280 RCS keyword updates for Bazaar
Replaced $Id$ and $Header$ keywords with $Revision-Id$
Deleted $Log$ keywords and any log messages
2010-10-05 14:27:37 -05:00
Andrew Johnson
5d17059cb1 libCom: Changes to epicsVersion.h generation
Use DEV instead of CVS in names.
Lower-case the -rc<n> status strings.
Rename CVS_DATE to COMMIT_DATE.
No Bazaar equivalent to the CVS tag $Name$ exists.
Modernize and "use strict" in the Perl code.
2010-10-05 13:33:35 -05:00
Andrew Johnson
6d1cc23a7e libCom/test: Enhanced epicsCalcTest.
Added testArgs() function and tests, and more bad expression tests.
2010-10-04 13:39:02 -05:00
Andrew Johnson
bb7d8d6435 libCom/calc: Added integer literals, which use less space in Postfix.
Renamed LITERAL to LITERAL_DOUBLE and added LITERAL_INT.
postfix() only uses LITERAL_INT if the results are identical.
Adjusted INFIX_TO_POSTFIX_SIZE() macro to match.
Cleaned up some other internal issues.
2010-10-04 13:32:34 -05:00
Andrew Johnson
641aa70eb1 libCom/test: Added Michael Davidsaver's unit tests for errlog 2010-09-30 14:36:30 -05:00
Andrew Johnson
48aabfc6ad libCom/test/epicsStringTest: %Zd isn't portable. 2010-09-29 17:44:10 -05:00
Andrew Johnson
eaaea901e0 libCom: fix epicsNAN generation on vxWorks. 2010-09-29 17:42:10 -05:00
Andrew Johnson
46c21d276b Merged the apple-ios branch, iPad & iPhone target support! 2010-09-23 15:48:23 -05:00
Andrew Johnson
9678b69c1e libCom/errlog: Rewrote msgbufGetNode() to use buffer better.
Michael Davidsaver pointed out that the original algorithm used is
dumb, it can't reuse empty space at the beginning until all messages
have been drained.  This new version can, and is more efficient.
2010-09-23 15:41:55 -05:00
Andrew Johnson
5b860ec3ec libCom: Use SIG_IGN to ignore signals.
Simplified the code in osdSignal, also solves problems if a handler is
already installed that uses the 3-argument callback.
2010-09-23 15:09:03 -05:00
Andrew Johnson
eacb6602bc libCom: Use OS NAN and INFINITY macros where available.
bug: 545385
2010-09-23 14:18:03 -05:00
Andrew Johnson
4e99cfc763 Added target support for Apple's iOS devices.
Tom Pelaia II and Mark Engbretson contributed the build configuration
and OS-dependent files, I modified the build config to bring it up to
R3.14.12 standards and added the Release Notes.
2010-09-22 16:26:15 -05:00
Michael Davidsaver
aee66600ef errPrintf() newline fix.
errPrintf() was adding a newline when writing to the err log buffer,
but not when printing to the screen.  This results in the error
message running together with the next line.  Added a newline to the
stderr output.
2010-09-01 14:56:51 -05:00
Andrew Johnson
a6a01e6822 Converted buckTest.c to use epicsTime.h instead of time.h
This should finally resolve the build conflict between RTEMS-uc5282
and Windows, and remove the build warning on vxWorks.
2010-08-17 17:53:43 -05:00
Jeff Hill
a3dd3e1a2f unistd.h isnt available on windows, and doesnt appear to be required by this code? 2010-08-16 17:34:39 -06:00
Andrew Johnson
09c0c43865 Cleanup a couple of compiler warnings. 2010-08-16 16:15:26 -05:00