summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/score/isrlock.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-11 12:10:53 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-12 09:12:03 +0200
commit18d45d9d25beceedcc3e34eea3d28f87fa200e76 (patch)
treef27c51849fe3ae495f60e015602d7f4418be5f56 /cpukit/include/rtems/score/isrlock.h
parentscore: Remove unused macros (diff)
downloadrtems-18d45d9d25beceedcc3e34eea3d28f87fa200e76.tar.bz2
score: Add _ISR_lock_Set_name()
Add _ISR_lock_Set_name() to optimize the initialization of zero-initialized locks.
Diffstat (limited to '')
-rw-r--r--cpukit/include/rtems/score/isrlock.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpukit/include/rtems/score/isrlock.h b/cpukit/include/rtems/score/isrlock.h
index b1aea62bf0..de85286de7 100644
--- a/cpukit/include/rtems/score/isrlock.h
+++ b/cpukit/include/rtems/score/isrlock.h
@@ -200,6 +200,21 @@ RTEMS_INLINE_ROUTINE void _ISR_lock_Context_set_level(
#endif
/**
+ * @brief Sets the name of an ISR lock.
+ *
+ * @param[out] _lock The ISR lock control.
+ * @param _name The name for the ISR lock. This name must be a string
+ * persistent throughout the life time of this lock. The name is only used
+ * if profiling is enabled.
+ */
+#if defined( RTEMS_SMP )
+ #define _ISR_lock_Set_name( _lock, _name ) \
+ _SMP_lock_Set_name( &( _lock )->Lock, _name )
+#else
+ #define _ISR_lock_Set_name( _lock, _name )
+#endif
+
+/**
* @brief Acquires an ISR lock.
*
* Interrupts will be disabled. On SMP configurations this function acquires