summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadrestart.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-10-31 16:23:52 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-03 11:23:30 +0100
commit47d246436f5b95359325740f4deb2df6345c971e (patch)
tree0d006b98e2449d66b8b882c39ffb6ef107e1532f /cpukit/score/src/threadrestart.c
parentscore: Relax _Scheduler_Set() restrictions (diff)
downloadrtems-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 'cpukit/score/src/threadrestart.c')
-rw-r--r--cpukit/score/src/threadrestart.c2
1 files changed, 2 insertions, 0 deletions
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 ),