summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadinitialize.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-14 10:17:34 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-31 08:29:42 +0200
commita5ac9da30737a3aeb2dcb0462a4eba25cb525253 (patch)
tree7bb4abcb4d350aa9618be52ceb942f63835bc6fc /cpukit/score/src/threadinitialize.c
parentscore: Add _Scheduler_Change_priority_if_higher() (diff)
downloadrtems-a5ac9da30737a3aeb2dcb0462a4eba25cb525253.tar.bz2
score: Add and use thread get/set CPU functions
Diffstat (limited to 'cpukit/score/src/threadinitialize.c')
-rw-r--r--cpukit/score/src/threadinitialize.c6
1 files changed, 3 insertions, 3 deletions
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;