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/src/threadrestart.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cpukit/score/src/threadrestart.c') diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c index 4d9e2c93ea..182cdb6128 100644 --- a/cpukit/score/src/threadrestart.c +++ b/cpukit/score/src/threadrestart.c @@ -133,6 +133,7 @@ static void _Thread_Add_to_zombie_chain( Thread_Control *the_thread ) static void _Thread_Make_zombie( Thread_Control *the_thread ) { +#if defined(RTEMS_SCORE_THREAD_ENABLE_RESOURCE_COUNT) if ( _Thread_Owns_resources( the_thread ) ) { _Terminate( INTERNAL_ERROR_CORE, @@ -140,6 +141,7 @@ static void _Thread_Make_zombie( Thread_Control *the_thread ) INTERNAL_ERROR_RESOURCE_IN_USE ); } +#endif _Objects_Close( _Objects_Get_information_id( the_thread->Object.id ), -- cgit v1.2.3