summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-06 15:28:41 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-14 16:26:07 +0200
commit1ccb64e18f1e4c1f51c12b9dc31a881e2829b2b6 (patch)
treecc5940c391f4e6fcdd63ec31fd129126d84b2329 /cpukit/score/include
parentscore: Simplify _Thread_Create_idle() (diff)
downloadrtems-1ccb64e18f1e4c1f51c12b9dc31a881e2829b2b6.tar.bz2
scheduler: Add start idle thread operation
Add and use _Scheduler_Start_idle().
Diffstat (limited to 'cpukit/score/include')
-rw-r--r--cpukit/score/include/rtems/score/scheduler.h17
-rw-r--r--cpukit/score/include/rtems/score/schedulercbs.h3
-rw-r--r--cpukit/score/include/rtems/score/scheduleredf.h3
-rw-r--r--cpukit/score/include/rtems/score/schedulerpriority.h3
-rw-r--r--cpukit/score/include/rtems/score/schedulersimple.h3
-rw-r--r--cpukit/score/include/rtems/score/thread.h6
6 files changed, 30 insertions, 5 deletions
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h
index 5c35a36de1..9e08b23e4f 100644
--- a/cpukit/score/include/rtems/score/scheduler.h
+++ b/cpukit/score/include/rtems/score/scheduler.h
@@ -89,6 +89,12 @@ typedef struct {
/** perform scheduler update actions required at each clock tick */
void ( *tick )(void);
+ /**
+ * @brief Starts the idle thread for a particular processor.
+ *
+ * @see _Scheduler_Start_idle().
+ */
+ void ( *start_idle )( Thread_Control *thread, Per_CPU_Control *processor );
} Scheduler_Operations;
/**
@@ -139,6 +145,17 @@ extern Scheduler_Control _Scheduler;
*/
void _Scheduler_Handler_initialization( void );
+/**
+ * @brief Unblocks the thread.
+ *
+ * @param[in/out] thread An idle thread.
+ * @param[in] processor This parameter is unused.
+ */
+void _Scheduler_default_Start_idle(
+ Thread_Control *thread,
+ Per_CPU_Control *processor
+);
+
#ifndef __RTEMS_APPLICATION__
#include <rtems/score/scheduler.inl>
#endif
diff --git a/cpukit/score/include/rtems/score/schedulercbs.h b/cpukit/score/include/rtems/score/schedulercbs.h
index 53452e044a..41f8ab0b57 100644
--- a/cpukit/score/include/rtems/score/schedulercbs.h
+++ b/cpukit/score/include/rtems/score/schedulercbs.h
@@ -60,7 +60,8 @@ extern "C" {
_Scheduler_EDF_Extract, /* extract entry point */ \
_Scheduler_EDF_Priority_compare, /* compares two priorities */ \
_Scheduler_CBS_Release_job, /* new period of task */ \
- _Scheduler_priority_Tick /* tick entry point */ \
+ _Scheduler_priority_Tick, /* tick entry point */ \
+ _Scheduler_default_Start_idle /* start idle entry point */ \
}
/* Return values for CBS server. */
diff --git a/cpukit/score/include/rtems/score/scheduleredf.h b/cpukit/score/include/rtems/score/scheduleredf.h
index 24f9a1ac32..e84b3f5909 100644
--- a/cpukit/score/include/rtems/score/scheduleredf.h
+++ b/cpukit/score/include/rtems/score/scheduleredf.h
@@ -53,7 +53,8 @@ extern "C" {
_Scheduler_EDF_Extract, /* extract entry point */ \
_Scheduler_EDF_Priority_compare, /* compares two priorities */ \
_Scheduler_EDF_Release_job, /* new period of task */ \
- _Scheduler_priority_Tick /* tick entry point */ \
+ _Scheduler_priority_Tick, /* tick entry point */ \
+ _Scheduler_default_Start_idle /* start idle entry point */ \
}
/**
diff --git a/cpukit/score/include/rtems/score/schedulerpriority.h b/cpukit/score/include/rtems/score/schedulerpriority.h
index f97bb7f075..81c3582e76 100644
--- a/cpukit/score/include/rtems/score/schedulerpriority.h
+++ b/cpukit/score/include/rtems/score/schedulerpriority.h
@@ -52,7 +52,8 @@ extern "C" {
_Scheduler_priority_Extract, /* extract entry point */ \
_Scheduler_priority_Priority_compare, /* compares two priorities */ \
_Scheduler_priority_Release_job, /* new period of task */ \
- _Scheduler_priority_Tick /* tick entry point */ \
+ _Scheduler_priority_Tick, /* tick entry point */ \
+ _Scheduler_default_Start_idle /* start idle entry point */ \
}
/**
diff --git a/cpukit/score/include/rtems/score/schedulersimple.h b/cpukit/score/include/rtems/score/schedulersimple.h
index df52a586be..6682074b7c 100644
--- a/cpukit/score/include/rtems/score/schedulersimple.h
+++ b/cpukit/score/include/rtems/score/schedulersimple.h
@@ -50,7 +50,8 @@ extern "C" {
_Scheduler_simple_Extract, /* extract entry point */ \
_Scheduler_priority_Priority_compare, /* compares two priorities */ \
_Scheduler_priority_Release_job, /* new period of task */ \
- _Scheduler_priority_Tick /* tick entry point */ \
+ _Scheduler_priority_Tick, /* tick entry point */ \
+ _Scheduler_default_Start_idle /* start idle entry point */ \
}
/**
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 3cddb5a3e9..60583a77c0 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -571,13 +571,17 @@ bool _Thread_Initialize(
* @param entry_point
* @param pointer_argument
* @param numeric_argument
+ * @param[in/out] processor The processor if used to start an idle thread
+ * during system initialization. Must be set to @c NULL to start a normal
+ * thread.
*/
bool _Thread_Start(
Thread_Control *the_thread,
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
- Thread_Entry_numeric_type numeric_argument
+ Thread_Entry_numeric_type numeric_argument,
+ Per_CPU_Control *processor
);
/**