summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/isrlock.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-03 14:44:15 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-04 10:54:53 +0100
commitee42943cd03e0f64319f90444d0c1d0c71e07089 (patch)
treea71dfbde8fd87e958f8c05c9c7a23776492023fa /cpukit/score/include/rtems/score/isrlock.h
parentscore: Use non-inline thread queue lock ops (diff)
downloadrtems-ee42943cd03e0f64319f90444d0c1d0c71e07089.tar.bz2
score: Optimize self-contained mutexes
Diffstat (limited to '')
-rw-r--r--cpukit/score/include/rtems/score/isrlock.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/isrlock.h b/cpukit/score/include/rtems/score/isrlock.h
index 5eb6a46c43..7dd2f29000 100644
--- a/cpukit/score/include/rtems/score/isrlock.h
+++ b/cpukit/score/include/rtems/score/isrlock.h
@@ -151,6 +151,24 @@ typedef struct {
#endif
/**
+ * @brief Sets the ISR level in the ISR lock context.
+ *
+ * @param[in] context The ISR lock context.
+ * @param[in] level The ISR level.
+ */
+RTEMS_INLINE_ROUTINE void _ISR_lock_Context_set_level(
+ ISR_lock_Context *context,
+ ISR_Level level
+)
+{
+#if defined( RTEMS_SMP )
+ context->Lock_context.isr_level = level;
+#else
+ context->isr_level = level;
+#endif
+}
+
+/**
* @brief Initializes an ISR lock.
*
* Concurrent initialization leads to unpredictable results.