summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems/rtems/asrimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-10 08:25:32 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-11 10:58:09 +0100
commitd50acdbb6c8213114ce887a56daea02697c9e1a1 (patch)
treee48fb252786992308fa2dd6337c8a02db35bd10b /cpukit/rtems/include/rtems/rtems/asrimpl.h
parentsapi: Use one SMP lock for all chains (diff)
downloadrtems-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/rtems/include/rtems/rtems/asrimpl.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/asrimpl.h b/cpukit/rtems/include/rtems/rtems/asrimpl.h
index ebb405279b..d67198f175 100644
--- a/cpukit/rtems/include/rtems/rtems/asrimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/asrimpl.h
@@ -61,13 +61,13 @@ RTEMS_INLINE_ROUTINE void _ASR_Swap_signals (
)
{
rtems_signal_set _signals;
- ISR_Level _level;
+ ISR_lock_Context lock_context;
- _ISR_lock_ISR_disable_and_acquire( &asr->Lock, _level );
+ _ISR_lock_ISR_disable_and_acquire( &asr->Lock, &lock_context );
_signals = asr->signals_pending;
asr->signals_pending = asr->signals_posted;
asr->signals_posted = _signals;
- _ISR_lock_Release_and_ISR_enable( &asr->Lock, _level );
+ _ISR_lock_Release_and_ISR_enable( &asr->Lock, &lock_context );
}
/**
@@ -110,11 +110,11 @@ RTEMS_INLINE_ROUTINE void _ASR_Post_signals(
rtems_signal_set *signal_set
)
{
- ISR_Level _level;
+ ISR_lock_Context lock_context;
- _ISR_lock_ISR_disable_and_acquire( &asr->Lock, _level );
+ _ISR_lock_ISR_disable_and_acquire( &asr->Lock, &lock_context );
*signal_set |= signals;
- _ISR_lock_Release_and_ISR_enable( &asr->Lock, _level );
+ _ISR_lock_Release_and_ISR_enable( &asr->Lock, &lock_context );
}
RTEMS_INLINE_ROUTINE rtems_signal_set _ASR_Get_posted_signals(
@@ -122,12 +122,12 @@ RTEMS_INLINE_ROUTINE rtems_signal_set _ASR_Get_posted_signals(
)
{
rtems_signal_set signal_set;
- ISR_Level _level;
+ ISR_lock_Context lock_context;
- _ISR_lock_ISR_disable_and_acquire( &asr->Lock, _level );
+ _ISR_lock_ISR_disable_and_acquire( &asr->Lock, &lock_context );
signal_set = asr->signals_posted;
asr->signals_posted = 0;
- _ISR_lock_Release_and_ISR_enable( &asr->Lock, _level );
+ _ISR_lock_Release_and_ISR_enable( &asr->Lock, &lock_context );
return signal_set;
}