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/smplock.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/smplock.h')
-rw-r--r-- | cpukit/score/include/rtems/score/smplock.h | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/cpukit/score/include/rtems/score/smplock.h b/cpukit/score/include/rtems/score/smplock.h index 101aa0a6a1..288fd454da 100644 --- a/cpukit/score/include/rtems/score/smplock.h +++ b/cpukit/score/include/rtems/score/smplock.h @@ -64,11 +64,11 @@ typedef struct { { ATOMIC_INITIALIZER_UINT( 0U ), ATOMIC_INITIALIZER_UINT( 0U ) } /** - * @brief Initializes an SMP ticket lock control. + * @brief Initializes an SMP ticket lock. * * Concurrent initialization leads to unpredictable results. * - * @param[out] lock The SMP ticket lock control. + * @param[in,out] lock The SMP ticket lock control. */ static inline void _SMP_ticket_lock_Initialize( SMP_ticket_lock_Control *lock ) { @@ -77,6 +77,18 @@ static inline void _SMP_ticket_lock_Initialize( SMP_ticket_lock_Control *lock ) } /** + * @brief Destroys an SMP ticket lock. + * + * Concurrent destruction leads to unpredictable results. + * + * @param[in,out] lock The SMP ticket lock control. + */ +static inline void _SMP_ticket_lock_Destroy( SMP_ticket_lock_Control *lock ) +{ + (void) lock; +} + +/** * @brief Acquires an SMP ticket lock. * * This function will not disable interrupts. The caller must ensure that the @@ -131,11 +143,11 @@ typedef struct { #define SMP_LOCK_INITIALIZER { SMP_TICKET_LOCK_INITIALIZER } /** - * @brief Initializes an SMP lock control. + * @brief Initializes an SMP lock. * * Concurrent initialization leads to unpredictable results. * - * @param[out] lock The SMP lock control. + * @param[in,out] lock The SMP lock control. */ static inline void _SMP_lock_Initialize( SMP_lock_Control *lock ) { @@ -143,6 +155,18 @@ static inline void _SMP_lock_Initialize( SMP_lock_Control *lock ) } /** + * @brief Destroys an SMP lock. + * + * Concurrent destruction leads to unpredictable results. + * + * @param[in,out] lock The SMP lock control. + */ +static inline void _SMP_lock_Destroy( SMP_lock_Control *lock ) +{ + _SMP_ticket_lock_Destroy( &lock->ticket_lock ); +} + +/** * @brief Acquires an SMP lock. * * This function will not disable interrupts. The caller must ensure that the |