From e366f774a76d3607ad41dc0992e787ce38df980d Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 31 Jan 2017 08:08:24 +0100 Subject: score: Add _Thread_queue_Object_name Add the special thread queue name _Thread_queue_Object_name to mark thread queues embedded in an object with identifier. Using the special thread state STATES_THREAD_QUEUE_WITH_IDENTIFIER is not reliable for this purpose since the thread wait information and thread state are protected by different SMP locks in separate critical sections. Remove STATES_THREAD_QUEUE_WITH_IDENTIFIER. Add and use _Thread_queue_Object_initialize(). Update #2858. --- cpukit/score/src/threadinitialize.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cpukit/score/src/threadinitialize.c') diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 60bbd22238..2eb6507565 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -250,13 +250,12 @@ bool _Thread_Initialize( _Thread_queue_Gate_open( &the_thread->Wait.Lock.Tranquilizer ); _RBTree_Initialize_node( &the_thread->Wait.Link.Registry_node ); _SMP_lock_Stats_initialize( &the_thread->Potpourri_stats, "Thread Potpourri" ); + _SMP_lock_Stats_initialize( &the_thread->Join_queue.Lock_stats, "Thread State" ); #endif /* Initialize the CPU for the non-SMP schedulers */ _Thread_Set_CPU( the_thread, cpu ); - _Thread_queue_Initialize( &the_thread->Join_queue ); - the_thread->current_state = STATES_DORMANT; the_thread->Wait.operations = &_Thread_queue_Operations_default; the_thread->Start.initial_priority = priority; -- cgit v1.2.3