diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-17 06:51:56 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-17 08:27:47 +0100 |
commit | 92dee4ab9cf806553d0cdaeb4968d25ced4a8b3a (patch) | |
tree | 1149b8eb63ce39dc7c4ae0695b55d5180ce633e4 /cpukit/rtems/include/rtems | |
parent | rtems: Avoid Giant lock in rtems_task_mode() (diff) | |
download | rtems-92dee4ab9cf806553d0cdaeb4968d25ced4a8b3a.tar.bz2 |
rtems: Avoid Giant lock in rtems_signal_catch()
Update #2555.
Diffstat (limited to '')
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/asrimpl.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/asrimpl.h b/cpukit/rtems/include/rtems/rtems/asrimpl.h index bcfb69a558..7c1c648533 100644 --- a/cpukit/rtems/include/rtems/rtems/asrimpl.h +++ b/cpukit/rtems/include/rtems/rtems/asrimpl.h @@ -59,6 +59,22 @@ RTEMS_INLINE_ROUTINE void _ASR_Destroy( ASR_Information *asr ) _ISR_lock_Destroy( &asr->Lock ); } +RTEMS_INLINE_ROUTINE void _ASR_Acquire( + ASR_Information *asr, + ISR_lock_Context *lock_context +) +{ + _ISR_lock_ISR_disable_and_acquire( &asr->Lock, lock_context ); +} + +RTEMS_INLINE_ROUTINE void _ASR_Release( + ASR_Information *asr, + ISR_lock_Context *lock_context +) +{ + _ISR_lock_Release_and_ISR_enable( &asr->Lock, lock_context ); +} + /** * @brief ASR_Swap_signals * @@ -73,11 +89,11 @@ RTEMS_INLINE_ROUTINE void _ASR_Swap_signals ( rtems_signal_set _signals; ISR_lock_Context lock_context; - _ISR_lock_ISR_disable_and_acquire( &asr->Lock, &lock_context ); + _ASR_Acquire( asr, &lock_context ); _signals = asr->signals_pending; asr->signals_pending = asr->signals_posted; asr->signals_posted = _signals; - _ISR_lock_Release_and_ISR_enable( &asr->Lock, &lock_context ); + _ASR_Release( asr, &lock_context ); } /** @@ -122,9 +138,9 @@ RTEMS_INLINE_ROUTINE void _ASR_Post_signals( { ISR_lock_Context lock_context; - _ISR_lock_ISR_disable_and_acquire( &asr->Lock, &lock_context ); + _ASR_Acquire( asr, &lock_context ); *signal_set |= signals; - _ISR_lock_Release_and_ISR_enable( &asr->Lock, &lock_context ); + _ASR_Release( asr, &lock_context ); } RTEMS_INLINE_ROUTINE rtems_signal_set _ASR_Get_posted_signals( @@ -134,10 +150,10 @@ RTEMS_INLINE_ROUTINE rtems_signal_set _ASR_Get_posted_signals( rtems_signal_set signal_set; ISR_lock_Context lock_context; - _ISR_lock_ISR_disable_and_acquire( &asr->Lock, &lock_context ); + _ASR_Acquire( asr, &lock_context ); signal_set = asr->signals_posted; asr->signals_posted = 0; - _ISR_lock_Release_and_ISR_enable( &asr->Lock, &lock_context ); + _ASR_Release( asr, &lock_context ); return signal_set; } |