From 347ef928986910efa8a743fbef9867eb9066eb1c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 3 Nov 2016 17:19:43 +0100 Subject: score: Provide inline variants for ISR lock ops --- cpukit/score/include/rtems/score/isrlock.h | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'cpukit/score/include/rtems/score/isrlock.h') diff --git a/cpukit/score/include/rtems/score/isrlock.h b/cpukit/score/include/rtems/score/isrlock.h index 294adecfb0..5eb6a46c43 100644 --- a/cpukit/score/include/rtems/score/isrlock.h +++ b/cpukit/score/include/rtems/score/isrlock.h @@ -281,6 +281,38 @@ typedef struct { (void) _context; #endif +/** + * @brief Acquires an ISR lock inside an ISR disabled section (inline). + * + * @see _ISR_lock_Acquire(). + */ +#if defined( RTEMS_SMP ) + #define _ISR_lock_Acquire_inline( _lock, _context ) \ + _SMP_lock_Acquire_inline( \ + &( _lock )->Lock, \ + &( _context )->Lock_context \ + ) +#else + #define _ISR_lock_Acquire_inline( _lock, _context ) \ + (void) _context; +#endif + +/** + * @brief Releases an ISR lock inside an ISR disabled section (inline). + * + * @see _ISR_lock_Release(). + */ +#if defined( RTEMS_SMP ) + #define _ISR_lock_Release_inline( _lock, _context ) \ + _SMP_lock_Release_inline( \ + &( _lock )->Lock, \ + &( _context )->Lock_context \ + ) +#else + #define _ISR_lock_Release_inline( _lock, _context ) \ + (void) _context; +#endif + #if defined( RTEMS_DEBUG ) /** * @brief Returns true, if the ISR lock is owned by the current processor, -- cgit v1.2.3