From a5ac9da30737a3aeb2dcb0462a4eba25cb525253 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 14 Mar 2014 10:17:34 +0100 Subject: score: Add and use thread get/set CPU functions --- cpukit/score/src/threadinitialize.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpukit/score/src/threadinitialize.c') diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index e481f63618..df491849c4 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -205,15 +205,15 @@ bool _Thread_Initialize( the_thread->is_scheduled = false; the_thread->is_in_the_air = false; the_thread->is_executing = false; - - /* Initialize the cpu field for the non-SMP schedulers */ - the_thread->cpu = _Per_CPU_Get_by_index( 0 ); #if __RTEMS_HAVE_SYS_CPUSET_H__ the_thread->affinity = *(_CPU_set_Default()); the_thread->affinity.set = &the_thread->affinity.preallocated; #endif #endif + /* Initialize the CPU for the non-SMP schedulers */ + _Thread_Set_CPU( the_thread, _Per_CPU_Get_by_index( 0 ) ); + the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; -- cgit v1.2.3