Commit Graph

2949 Commits

Author SHA1 Message Date
Andrew Johnson
3fc6a77fb0 libCom/posix: Define finite() for uClibc
The finite() function is provided in glibc but not in uClibc.
C99 requires isfinite() to be a macro, so we can test for it
and define our own finite() macro in osi/os/posix/epicsMath.h
2011-12-02 11:07:04 -06:00
Andrew Johnson
2010e58c61 libCom/win32: Conditionally define MINLONGLONG
Some version of Visual Studio define MAXLONGLONG but not
MINLONGLONG, so they need separate checks.
2011-11-29 14:07:29 -06:00
Andrew Johnson
b791a3692b libCom: Clean up win32 build warning
Delete CFLAG added for the Borland compiler (no longer supported).
2011-11-28 15:54:49 -06:00
Jeff Hill
6ef52b5d03 fixed launchpad bug 697509, Thread synchronization issue in libCom/osi/os/WIN32/osdTime.cpp 2011-11-10 17:34:47 -07:00
Jeff Hill
652235ef13 fixed LP Bug #697517, WIN32 osdtime should handle the system time change properly 2011-11-10 17:22:22 -07:00
Jeff Hill
5b46eebe1a fixed LP bug 697516, PLL time adjustments fail if user sets system time before EPICS epoch 2011-11-10 14:52:22 -07:00
Jeff Hill
a252218e69 fixed launchpad bug 697519 (rollover time diff calc off by two ticks) 2011-11-10 14:03:01 -07:00
Andrew Johnson
bb14c6594b Win32: Fix for lp:861214 2011-11-08 15:57:15 -06:00
Andrew Johnson
b36b07db9e Clean up some compiler warnings reported by J. Lewis Muir. 2011-11-07 11:58:09 -06:00
Till Straumann
6c4164d953 libCom: Second fix for RT thread priority
The previous fix prevented epicsThreads from working properly when
the RT scheduler is *not* used.

fixes lp:835138
2011-09-21 09:55:52 -05:00
Andrew Johnson
75aa05d30f libCom: Remove extern "C" { #include <...> } from osdSock.h
Our joint conclusion was that wrapping system includes with
extern "C" used to be necessary on some OS builds when C++
was much less common, but is now wrong.
2011-09-09 17:14:35 -05:00
Andrew Johnson
3cfa011760 libCom: Clean up warning from Darwin. 2011-09-09 17:10:32 -05:00
Till Straumann
f203e9a48b libCom: Fix OS priority mapping on Posix
Fixes lp:835138
2011-08-30 14:47:31 -05:00
Till Straumann
2b65025d93 RTEMS: Time registration when dynamically loading
The old test for discriminating between statically and dynamically
linked applications (os/RTEMS/osdTime.cpp:staticTimeRegister()) is
wrong, it never detects a dynamically loaded app.

fixes lp:831648
-------------- This line and the following will be ignored
--------------

modified:
  src/libCom/osi/os/RTEMS/osdTime.cpp
2011-08-23 13:20:00 -05:00
Ralph Lange
bc4a7854ec libCom: Explicitly use namespace std for size_t declaration in epicsSingleton.h
This fixes a compile error that occurs in new gcc versions (since ~4.6.1)
2011-08-08 18:31:19 +02:00
Andrew Johnson
e71785edf6 libCom/devLib: Make unsolicitedHandlerEPICS() visible
This symbol is required to be visible on non-PowerPC (68k) vxWorks
systems for devInterruptInUseVME() to recognize interrupt vectors
that the devDisconnectInterruptVME() routine has marked as not used.
2011-07-21 16:10:50 -05:00
Michael Davidsaver
a80bd1a630 libCom: Avoid race in errlog shutdown.
A rare race during shutdown.  The contenders are the log thread
coming out of its loop and calling errlogCleanup(), and the
exitHandler signaling waitForWork.

This solution is to move cleanup completely into exitHandler,
which already waits for the log thread to exit.
2011-07-08 11:18:00 -05:00
Andrew Johnson
2fb7df8548 libCom: __attribute__((deprecated)) not in gcc 2.x
Only apply this attribute for gcc 3 and later.
2011-06-20 13:52:32 -05:00
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