diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-07 14:36:22 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-14 08:46:49 +0100 |
commit | 53ad908a646eb6fd67f9b4586f4b484e8255b9d3 (patch) | |
tree | 7dd408879d01a507e6052f375ec6e14ab3f8965d /cpukit/score/include/rtems/score/isrlock.h | |
parent | score: Add per-CPU profiling (diff) | |
download | rtems-53ad908a646eb6fd67f9b4586f4b484e8255b9d3.tar.bz2 |
score: Add SMP lock profiling support
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/isrlock.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/cpukit/score/include/rtems/score/isrlock.h b/cpukit/score/include/rtems/score/isrlock.h index 27e4aadffa..b12b174ebc 100644 --- a/cpukit/score/include/rtems/score/isrlock.h +++ b/cpukit/score/include/rtems/score/isrlock.h @@ -71,10 +71,10 @@ typedef struct { * @brief Initializer for static initialization of ISR locks. */ #if defined( RTEMS_SMP ) - #define ISR_LOCK_INITIALIZER \ - { SMP_LOCK_INITIALIZER } + #define ISR_LOCK_INITIALIZER( name ) \ + { SMP_LOCK_INITIALIZER( name ) } #else - #define ISR_LOCK_INITIALIZER \ + #define ISR_LOCK_INITIALIZER( name ) \ { } #endif @@ -84,13 +84,19 @@ typedef struct { * Concurrent initialization leads to unpredictable results. * * @param[in,out] lock The ISR lock control. + * @param[in] name The name for the ISR lock. This name must be persistent + * throughout the life time of this lock. */ -static inline void _ISR_lock_Initialize( ISR_lock_Control *lock ) +static inline void _ISR_lock_Initialize( + ISR_lock_Control *lock, + const char *name +) { #if defined( RTEMS_SMP ) - _SMP_lock_Initialize( &lock->lock ); + _SMP_lock_Initialize( &lock->lock, name ); #else (void) lock; + (void) name; #endif } |