Experimental Physics and
| |||||||||||||||
|
To be honest, I dont know if it's safe for a signal handler to join a thread context. There's at least one possible race condition in this case: the signal handler could execute after ca_task_exit() has been called. What other race conditions are you thinking about? The POSIX documentation I've found includes neither pthread_setspecific nor pthread_getspecific in the list of routines safe to call from a signal handler. For example, the Solaris documentation describes these routines as MT-Safe, but not as Async-Signal-Safe. Given this, I would say that ca_current_context and ca_attach_context should not be called from a signal handler since they end up calling the pthread routines. Can anybody with access to the POSIX standard check and confirm the unsafe nature of the pthread_[set/get]specific() routines?
That may be a while since he's currently caught up in the security situation at Los Alamos. -- Eric Norum [email protected] Advanced Photon Source Phone: (630) 252-4793 Argonne National Laboratory
| ||||||||||||||
ANJ, 10 Aug 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |