summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-05-15 08:47:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-05-15 12:18:49 +0200
commit6359b68afebf75608bd7f05dc6cddd957c4ba9ca (patch)
tree99afe5c5f5d89ab1dcf53ecaea9e98d47643a692 /cpukit/score/src
parentscore: Add and use _Scheduler_default_Schedule() (diff)
downloadrtems-6359b68afebf75608bd7f05dc6cddd957c4ba9ca.tar.bz2
score: Add and use _Scheduler_SMP_Start_idle()
Diffstat (limited to '')
-rw-r--r--cpukit/score/src/schedulerprioritysmp.c11
-rw-r--r--cpukit/score/src/schedulersimplesmp.c11
-rw-r--r--cpukit/score/src/schedulersmpstartidle.c29
3 files changed, 29 insertions, 22 deletions
diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c
index 0c02b4433e..956b7cf90f 100644
--- a/cpukit/score/src/schedulerprioritysmp.c
+++ b/cpukit/score/src/schedulerprioritysmp.c
@@ -325,14 +325,3 @@ void _Scheduler_priority_SMP_Yield(
_ISR_Enable( level );
}
-
-void _Scheduler_priority_SMP_Start_idle(
- const Scheduler_Control *scheduler,
- Thread_Control *thread,
- Per_CPU_Control *cpu
-)
-{
- Scheduler_Context *context = _Scheduler_Get_context( scheduler );
-
- _Scheduler_SMP_Start_idle( context, thread, cpu );
-}
diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c
index 88f301a62c..a743cf9fff 100644
--- a/cpukit/score/src/schedulersimplesmp.c
+++ b/cpukit/score/src/schedulersimplesmp.c
@@ -261,14 +261,3 @@ void _Scheduler_simple_SMP_Yield(
_ISR_Enable( level );
}
-
-void _Scheduler_simple_SMP_Start_idle(
- const Scheduler_Control *scheduler,
- Thread_Control *thread,
- Per_CPU_Control *cpu
-)
-{
- Scheduler_Context *context = _Scheduler_Get_context( scheduler );
-
- _Scheduler_SMP_Start_idle( context, thread, cpu );
-}
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 );
+}