diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-10 08:25:32 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-11 10:58:09 +0100 |
commit | d50acdbb6c8213114ce887a56daea02697c9e1a1 (patch) | |
tree | e48fb252786992308fa2dd6337c8a02db35bd10b /cpukit/posix/src/psignal.c | |
parent | sapi: Use one SMP lock for all chains (diff) | |
download | rtems-d50acdbb6c8213114ce887a56daea02697c9e1a1.tar.bz2 |
score: Add local context to SMP lock API
Add a local context structure to the SMP lock API for acquire and
release pairs. This context can be used to store the ISR level and
profiling information. It may be later used to enable more
sophisticated lock algorithms, e.g. MCS locks.
There is only one lock that cannot be used with a local context. This
is the per-CPU lock since here we would have to transfer the local
context through a context switch which is very complicated.
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/psignal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c index 5258b2bf9e..fbe96b34ea 100644 --- a/cpukit/posix/src/psignal.c +++ b/cpukit/posix/src/psignal.c @@ -118,7 +118,7 @@ static void _POSIX_signals_Post_switch_hook( { POSIX_API_Control *api; int signo; - ISR_Level level; + ISR_lock_Context lock_context; int hold_errno; Thread_Control *executing; @@ -146,13 +146,13 @@ static void _POSIX_signals_Post_switch_hook( * processed at all. No point in doing this loop otherwise. */ while (1) { - _POSIX_signals_Acquire( level ); + _POSIX_signals_Acquire( &lock_context ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { - _POSIX_signals_Release( level ); + _POSIX_signals_Release( &lock_context ); break; } - _POSIX_signals_Release( level ); + _POSIX_signals_Release( &lock_context ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); |