summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threadinitialize.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/threadinitialize.c')
-rw-r--r--cpukit/score/src/threadinitialize.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
index bd0031fa7c..a87614721a 100644
--- a/cpukit/score/src/threadinitialize.c
+++ b/cpukit/score/src/threadinitialize.c
@@ -181,7 +181,9 @@ bool _Thread_Initialize(
#if defined(RTEMS_SMP)
the_thread->is_scheduled = false;
the_thread->is_executing = false;
- the_thread->cpu = NULL;
+
+ /* Initialize the cpu field for the non-SMP schedulers */
+ the_thread->cpu = _Per_CPU_Get_by_index( 0 );
#endif
the_thread->current_state = STATES_DORMANT;