diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-10-31 16:23:52 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-03 11:23:30 +0100 |
commit | 47d246436f5b95359325740f4deb2df6345c971e (patch) | |
tree | 0d006b98e2449d66b8b882c39ffb6ef107e1532f /cpukit/score/include/rtems/score/thread.h | |
parent | score: Relax _Scheduler_Set() restrictions (diff) | |
download | rtems-47d246436f5b95359325740f4deb2df6345c971e.tar.bz2 |
score: Conditionally enable thread resource count
Maintain the thread resource count only in debug configurations. This
is a performance optimization for non-debug configurations.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index ff7f13be55..7711f706f3 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -83,6 +83,10 @@ extern "C" { #define RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API #endif +#if defined(RTEMS_DEBUG) +#define RTEMS_SCORE_THREAD_ENABLE_RESOURCE_COUNT +#endif + /* * Only provided for backward compatiblity to not break application * configurations. @@ -492,8 +496,10 @@ typedef struct { */ Priority_Node Real_priority; +#if defined(RTEMS_SCORE_THREAD_ENABLE_RESOURCE_COUNT) /** This field is the number of mutexes currently held by this proxy. */ uint32_t resource_count; +#endif /** * @brief Scheduler related control. @@ -716,8 +722,10 @@ struct _Thread_Control { */ Priority_Node Real_priority; +#if defined(RTEMS_SCORE_THREAD_ENABLE_RESOURCE_COUNT) /** This field is the number of mutexes currently held by this thread. */ uint32_t resource_count; +#endif /** * @brief Scheduler related control. |