summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/isrlock.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-07 12:53:41 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-11 10:58:09 +0100
commit28779c70ffebbb2006eb7df01d64180859bb324e (patch)
tree18a8a77fce926492c090ca2bea21904d743adeb6 /cpukit/score/include/rtems/score/isrlock.h
parentscore: Add local context to SMP lock API (diff)
downloadrtems-28779c70ffebbb2006eb7df01d64180859bb324e.tar.bz2
score: Add function to destroy SMP locks
Diffstat (limited to 'cpukit/score/include/rtems/score/isrlock.h')
-rw-r--r--cpukit/score/include/rtems/score/isrlock.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/isrlock.h b/cpukit/score/include/rtems/score/isrlock.h
index e118475968..27e4aadffa 100644
--- a/cpukit/score/include/rtems/score/isrlock.h
+++ b/cpukit/score/include/rtems/score/isrlock.h
@@ -95,6 +95,22 @@ static inline void _ISR_lock_Initialize( ISR_lock_Control *lock )
}
/**
+ * @brief Destroys an ISR lock.
+ *
+ * Concurrent destruction leads to unpredictable results.
+ *
+ * @param[in,out] lock The ISR lock control.
+ */
+static inline void _ISR_lock_Destroy( ISR_lock_Control *lock )
+{
+#if defined( RTEMS_SMP )
+ _SMP_lock_Destroy( &lock->lock );
+#else
+ (void) lock;
+#endif
+}
+
+/**
* @brief Acquires an ISR lock.
*
* Interrupts will be disabled. On SMP configurations this function acquires