[rtems commit] score: Provide inline variants for ISR lock ops

Sebastian Huber sebh at rtems.org
Fri Nov 4 10:08:43 UTC 2016


Module:    rtems
Branch:    master
Commit:    347ef928986910efa8a743fbef9867eb9066eb1c
Changeset: http://git.rtems.org/rtems/commit/?id=347ef928986910efa8a743fbef9867eb9066eb1c

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Nov  3 17:19:43 2016 +0100

score: Provide inline variants for ISR lock ops

---

 cpukit/score/include/rtems/score/isrlock.h | 32 ++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/cpukit/score/include/rtems/score/isrlock.h b/cpukit/score/include/rtems/score/isrlock.h
index 294adec..5eb6a46 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,




More information about the vc mailing list