diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-07 12:53:41 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-11 10:58:09 +0100 |
commit | 28779c70ffebbb2006eb7df01d64180859bb324e (patch) | |
tree | 18a8a77fce926492c090ca2bea21904d743adeb6 /cpukit/score/include/rtems/score/isrlock.h | |
parent | score: Add local context to SMP lock API (diff) | |
download | rtems-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.h | 16 |
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 |