diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-27 14:43:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-30 16:16:21 +0200 |
commit | 93306058c0417b1c6e950b44ef279e096062dfba (patch) | |
tree | 1a3326d052169d2aec4c4acdd894589d5d84614c /cpukit/posix/src/psignalunblockthread.c | |
parent | score: Add _Thread_queue_Context_set_MP_callout() (diff) | |
download | rtems-93306058c0417b1c6e950b44ef279e096062dfba.tar.bz2 |
score: _CORE_mutex_Check_dispatch_for_seize()
Move the safety check performed by
_CORE_mutex_Check_dispatch_for_seize() out of the performance critical
path and generalize it. Blocking on a thread queue with an unexpected
thread dispatch disabled level is illegal in all system states.
Add the expected thread dispatch disable level (which may be 1 or 2
depending on the operation) to Thread_queue_Context and use it in
_Thread_queue_Enqueue_critical().
Diffstat (limited to 'cpukit/posix/src/psignalunblockthread.c')
-rw-r--r-- | cpukit/posix/src/psignalunblockthread.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c index b4475b268d..d75e454655 100644 --- a/cpukit/posix/src/psignalunblockthread.c +++ b/cpukit/posix/src/psignalunblockthread.c @@ -96,9 +96,9 @@ static void _POSIX_signals_Action_handler( ISR_lock_Context *lock_context ) { - POSIX_API_Control *api; - int signo; - uint32_t hold_errno; + POSIX_API_Control *api; + int signo; + uint32_t hold_errno; (void) action; _Thread_State_release( executing, lock_context ); @@ -135,13 +135,16 @@ static void _POSIX_signals_Action_handler( * processed at all. No point in doing this loop otherwise. */ while (1) { - _POSIX_signals_Acquire( lock_context ); + Thread_queue_Context queue_context; + + _Thread_queue_Context_initialize( &queue_context ); + _POSIX_signals_Acquire( &queue_context ); if ( !(api->signals_unblocked & (api->signals_pending | _POSIX_signals_Pending)) ) { - _POSIX_signals_Release( lock_context ); + _POSIX_signals_Release( &queue_context ); break; } - _POSIX_signals_Release( lock_context ); + _POSIX_signals_Release( &queue_context ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); |