diff options
Diffstat (limited to 'cpukit/score/src/schedulersmpstartidle.c')
-rw-r--r-- | cpukit/score/src/schedulersmpstartidle.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/cpukit/score/src/schedulersmpstartidle.c b/cpukit/score/src/schedulersmpstartidle.c new file mode 100644 index 0000000000..420bcc018e --- /dev/null +++ b/cpukit/score/src/schedulersmpstartidle.c @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2013-2014 embedded brains GmbH + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#if HAVE_CONFIG_H + #include "config.h" +#endif + +#include <rtems/score/schedulersmpimpl.h> + +void _Scheduler_SMP_Start_idle( + const Scheduler_Control *scheduler, + Thread_Control *thread, + Per_CPU_Control *cpu +) +{ + Scheduler_Context *context = _Scheduler_Get_context( scheduler ); + Scheduler_SMP_Context *self = _Scheduler_SMP_Get_self( context ); + Scheduler_SMP_Node *node = _Scheduler_SMP_Node_get( thread ); + + node->state = SCHEDULER_SMP_NODE_SCHEDULED; + + _Thread_Set_CPU( thread, cpu ); + _Chain_Append_unprotected( &self->Scheduled, &thread->Object.Node ); +} |