Andrew Johnson
e18eca80db
Changes from patch in lp:1539791
2016-02-23 15:43:26 -06:00
Ralph Lange
90b9965caf
libCom/osi: add epicsThreadGetCPUs()
...
* Implementation for posix and WIN32 tries to get the CPUs available for this process,
rather than the complete number of CPUs in the system.
* For the time being, vxWorks returns 1. (This will have to change for vxWorks SMP.)
2013-03-28 15:03:29 +01:00
Andrew Johnson
0597f9c1c8
libCom: Fixed issues with thread-hooks.
2012-07-06 16:33:10 -05:00
Andrew Johnson
a857f7a5ed
Merged Ralph's thread-hooks branch.
...
Minor modifications to fix the vxWorks epicsThreadInit() and
rename some functions.
2012-07-04 13:28:55 -05:00
Ralph Lange
137283ec0b
libCom/osi: Add default start hook for _main_ thread
2012-07-03 15:27:50 +02:00
Ralph Lange
7b47cad8e4
libCom/osi: Clean up epicsThreadHooks API
...
- remove exit hooks completely
- remove non-public functions fom header files
- add test for epicsThreadMap
- fix bugs in RTEMS and vxWorks implementation of epicsThreadMap
2012-07-03 14:38:12 +02:00
Ralph Lange
e834832cda
libCom/osi: Don't decorate epicsThreadHook functions with epicsShareAPI
2012-07-03 13:20:01 +02:00
Ralph Lange
d6648d4473
libCom/osi: Add some copyrights for ITER
2012-06-29 18:12:07 +02:00
Ralph Lange
8c323b2197
libCom/osi: Add epicsThreadMap (calls user function for each thread)
2012-06-29 17:54:38 +02:00
Ralph Lange
803777329c
Cleanup of epicsThread hooks
...
- move declarations to epicsThread.h, use epicsThreadId type
- use static elllist initializer for static lists
2012-06-29 11:15:47 +02:00
Andrew Johnson
c5a27fa32e
Rework epicsThreadOnce() using ideas from Michael Davidsaver.
...
An epicsThreadOnceId is now an epicsThreadId.
During initialization, it is set to the thread running the init routine
which can now detect a recursive initialization attempt and suspend.
EPICS_THREAD_ONCE_INIT is still zero, the implementations now define a
new private value for EPICS_THREAD_ONCE_DONE. This is deliberately not
made public.
2010-04-26 15:38:11 -05:00
Jeff Hill
78fc566dc4
improved thread creation failure exception diagnostics
2009-08-14 16:54:45 +00:00
Jeff Hill
6fe047731f
added shjow func to epicsThread class
2009-08-10 21:48:50 +00:00
Jeff Hill
20bd4e9b23
fixed no try catch block for exceptions occurring when fetching the time to print a diagnostic message in the last chance exception handler.
2009-05-11 21:52:19 +00:00
Andrew Johnson
f58002e1fd
Exception classes don't need to derive from std::exception,
...
this can cause build faults on some architectures.
2008-10-07 15:19:35 +00:00
Andrew Johnson
4831cf2421
Changed static consts to #defines, so C code can use in static initializers.
2008-05-19 14:26:49 +00:00
Andrew Johnson
4a98bdd599
Clear up gcc warnings.
2006-11-28 21:23:25 +00:00
Jeff Hill
54a5a71377
fixed throw spec
2004-10-08 16:55:58 +00:00
Jeff Hill
7571947ceb
o fixed "no exception thrown if epicsThreadCreate() return nill"
...
o added epicsThreadMustCreate
o cleaned up thread rundown blocking
o header file need not include exception support
2004-10-08 14:46:48 +00:00
Jeff Hill
361d617ede
o fixed so that a thread that has not began will terminate if another thread
...
calls exit wait
o use independent event semaphore assisting these two threads to block
1) spawned thread
2) thread waiting for spawned thread to exit
2004-10-01 23:27:25 +00:00
Marty Kraimer
8148784a20
exitWait ( double delay ) => exitWait (const double delay )
2004-07-16 12:53:56 +00:00
Marty Kraimer
f54d1ca30a
epicsThreadIsOkToBlock epicsThreadSetOkToBlock only for calling thread
2004-07-13 13:35:35 +00:00
Marty Kraimer
f2fc8f8838
ShellContext=>OkToBlock
2004-07-09 17:53:54 +00:00
Marty Kraimer
b97efc9f7d
implement ShellContext
2004-07-09 16:05:53 +00:00
Jeff Hill
70a6e931fb
best not to bracket include with extern "C"
2004-01-30 01:24:22 +00:00
Marty Kraimer
c4184be87c
get rid of lazt init for SMP safe
2003-08-25 19:42:59 +00:00
Jeff Hill
038ef5db8d
removed virtual destructor when there are no virtual functions
2003-08-20 16:14:39 +00:00
Jeff Hill
6d5061781c
fixed race condition at thread exit
2003-05-23 00:11:59 +00:00
Jeff Hill
4c142e759c
added epicsThreadSleepQuantum()
2003-03-21 19:19:24 +00:00
Jeff Hill
33ffc42b15
FIX sunpro WARNING
2002-12-05 21:57:27 +00:00
Marty Kraimer
22898be749
add epicsThreadPriorityIocsh andepicsThreadPriorityBaseMax
2002-12-02 15:58:55 +00:00
Jeff Hill
d42af1ff85
added getId mf
2002-10-23 22:18:52 +00:00
Janet B. Anderson
93b0bf478d
Updated license comments.
2002-07-12 21:35:43 +00:00
Jeff Hill
c4c7ee7803
added exit and waitRelease capabilities to epicsThread class
2002-05-14 20:24:49 +00:00
Jeff Hill
75ed067b7d
allow derived class destructor to wait for thread exit
2002-04-19 18:03:48 +00:00
Jeff Hill
75b572be78
improved dll interface
2002-03-22 02:03:18 +00:00
Jeff Hill
1464be33db
added exception
2002-03-21 22:19:45 +00:00
Jeff Hill
abf2b19755
define a priority range for the CA server
2001-08-29 17:38:48 +00:00
Ralph Lange
3712987800
Fixed HPUX warnings.
2001-07-26 07:59:07 +00:00
Jeff Hill
b13d938b11
use struct ptr for ID types because:
...
o this is more type safe
o this works better with source level debuggers
2001-06-06 17:28:37 +00:00
Jeff Hill
94fa715e96
added const to show () vf
2001-02-15 21:09:52 +00:00
Marty Kraimer
e4641c3d3b
add show method
2001-02-13 17:08:35 +00:00
Marty Kraimer
e347cbd2e6
osiInterrupt=>epicsInterrupt; epicsThreadInit now static
2001-01-22 20:10:19 +00:00
Janet B. Anderson
e0181dfae0
add decoration
2001-01-18 20:50:04 +00:00
Marty Kraimer
dbe9c8e75f
changes for osiThread=>epicsThread
2001-01-18 19:08:14 +00:00