From 47d246436f5b95359325740f4deb2df6345c971e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 31 Oct 2016 16:23:52 +0100 Subject: score: Conditionally enable thread resource count Maintain the thread resource count only in debug configurations. This is a performance optimization for non-debug configurations. --- cpukit/score/include/rtems/score/thread.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cpukit/score/include/rtems/score/thread.h') 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. -- cgit v1.2.3