summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-03 17:19:43 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-04 10:54:52 +0100
commit347ef928986910efa8a743fbef9867eb9066eb1c (patch)
tree51a261e92ce431284c5fa2b9853f6a934e2c83b3
parentscore: Default to non-inline SMP lock ops (diff)
downloadrtems-347ef928986910efa8a743fbef9867eb9066eb1c.tar.bz2
score: Provide inline variants for ISR lock ops
-rw-r--r--cpukit/score/include/rtems/score/isrlock.h32
1 files changed, 32 insertions, 0 deletions
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,