diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-14 10:17:34 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-31 08:29:42 +0200 |
commit | a5ac9da30737a3aeb2dcb0462a4eba25cb525253 (patch) | |
tree | 7bb4abcb4d350aa9618be52ceb942f63835bc6fc /cpukit/score/src | |
parent | score: Add _Scheduler_Change_priority_if_higher() (diff) | |
download | rtems-a5ac9da30737a3aeb2dcb0462a4eba25cb525253.tar.bz2 |
score: Add and use thread get/set CPU functions
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/schedulersmpstartidle.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/threadinitialize.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/score/src/schedulersmpstartidle.c b/cpukit/score/src/schedulersmpstartidle.c index db98c99b40..75d1c8f8f5 100644 --- a/cpukit/score/src/schedulersmpstartidle.c +++ b/cpukit/score/src/schedulersmpstartidle.c @@ -35,6 +35,6 @@ void _Scheduler_SMP_Start_idle( Scheduler_SMP_Control *self = _Scheduler_SMP_Instance(); thread->is_scheduled = true; - thread->cpu = cpu; + _Thread_Set_CPU( thread, cpu ); _Chain_Append_unprotected( &self->scheduled, &thread->Object.Node ); } 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; |