diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-06-26 12:54:33 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-07-30 09:11:13 +0200 |
commit | 0e3c59d65c3d1d3351103abf743aa9702452343c (patch) | |
tree | 39b7187c20bad43b43f0999d55c957d29c0b8adc /cpukit/score/include/rtems/score/thread.h | |
parent | score: Add potpourri lock statistics (diff) | |
download | rtems-0e3c59d65c3d1d3351103abf743aa9702452343c.tar.bz2 |
score: Use a plain ticket lock for thread locks
This enables external libraries to use thread locks since they are
independent of the actual RTEMS build configuration, e.g. profiling
enabled or disabled.
Diffstat (limited to 'cpukit/score/include/rtems/score/thread.h')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index ac908e2b82..94ce31ed50 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -651,14 +651,30 @@ typedef struct { typedef struct { /** * @brief The current thread lock. + * + * This is a plain ticket lock without SMP lock statistics support. This + * enables external libraries to use thread locks since they are independent + * of the actual RTEMS build configuration, e.g. profiling enabled or + * disabled. */ - ISR_lock_Control *current; + SMP_ticket_lock_Control *current; /** * @brief The default thread lock in case the thread is not blocked on a * resource. */ - ISR_lock_Control Default; + SMP_ticket_lock_Control Default; + +#if defined(RTEMS_PROFILING) + /** + * @brief The thread lock statistics. + * + * These statistics are used by the executing thread in case it acquires a + * thread lock. Thus the statistics are an aggregation of acquire and + * release operations of diffent locks. + */ + SMP_lock_Stats Stats; +#endif /** * @brief Generation number to invalidate stale locks. |