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/sigaction.c | |
parent | 0e1d11f3f0f02768ced350fcb53056c55f0c545b (diff) |
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/sigaction.c')
-rw-r--r-- | cpukit/posix/src/sigaction.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cpukit/posix/src/sigaction.c b/cpukit/posix/src/sigaction.c index 177dcd19ab..26df98d394 100644 --- a/cpukit/posix/src/sigaction.c +++ b/cpukit/posix/src/sigaction.c @@ -33,7 +33,7 @@ int sigaction( struct sigaction *__restrict oact ) { - ISR_lock_Context lock_context; + Thread_queue_Context queue_context; if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); @@ -51,7 +51,8 @@ int sigaction( if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); - _POSIX_signals_Acquire( &lock_context ); + _Thread_queue_Context_initialize( &queue_context ); + _POSIX_signals_Acquire( &queue_context ); if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; @@ -76,7 +77,7 @@ int sigaction( } } - _POSIX_signals_Release( &lock_context ); + _POSIX_signals_Release( &queue_context ); return 0; } |