diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-04 10:56:36 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-04-15 08:37:11 +0200 |
commit | e1598a616db1e9dadfd74abeb20b1f1ec5daaa7f (patch) | |
tree | 0aabc512f4beb2b30eba7885926d06a878988855 /cpukit/score/include/rtems/score/schedulersimple.h | |
parent | score: Add and use RTEMS_ZERO_LENGTH_ARRAY (diff) | |
download | rtems-e1598a616db1e9dadfd74abeb20b1f1ec5daaa7f.tar.bz2 |
score: Static scheduler configuration
Do not allocate the scheduler control structures from the workspace.
This is a preparation step for configuration of clustered/partitioned
schedulers on SMP.
Diffstat (limited to 'cpukit/score/include/rtems/score/schedulersimple.h')
-rw-r--r-- | cpukit/score/include/rtems/score/schedulersimple.h | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/cpukit/score/include/rtems/score/schedulersimple.h b/cpukit/score/include/rtems/score/schedulersimple.h index 889c5a79c6..213bbb2709 100644 --- a/cpukit/score/include/rtems/score/schedulersimple.h +++ b/cpukit/score/include/rtems/score/schedulersimple.h @@ -55,21 +55,26 @@ extern "C" { } /** - * @brief Simple scheduler control. + * @brief Simple scheduler context. */ typedef struct { /** + * @brief Basic scheduler context. + */ + Scheduler_Context Base; + + /** * @brief One ready queue for all ready threads. */ Chain_Control Ready; -} Scheduler_simple_Control; +} Scheduler_simple_Context; /** * @brief Initialize simple scheduler. * * This routine initializes the simple scheduler. */ -void _Scheduler_simple_Initialize( void ); +void _Scheduler_simple_Initialize( const Scheduler_Control *scheduler ); /** * This routine sets the heir thread to be the next ready thread @@ -77,8 +82,8 @@ void _Scheduler_simple_Initialize( void ); * information. */ void _Scheduler_simple_Schedule( - Scheduler_Control *scheduler, - Thread_Control *the_thread + const Scheduler_Control *scheduler, + Thread_Control *the_thread ); /** @@ -98,8 +103,8 @@ void _Scheduler_simple_Schedule( * @param[in,out] thread The yielding thread. */ void _Scheduler_simple_Yield( - Scheduler_Control *scheduler, - Thread_Control *the_thread + const Scheduler_Control *scheduler, + Thread_Control *the_thread ); /** @@ -113,8 +118,8 @@ void _Scheduler_simple_Yield( * @param[in] the_thread is the thread that is to be blocked */ void _Scheduler_simple_Block( - Scheduler_Control *scheduler, - Thread_Control *the_thread + const Scheduler_Control *scheduler, + Thread_Control *the_thread ); /** @@ -127,8 +132,8 @@ void _Scheduler_simple_Block( * @param[in] the_thread is the thread that is to be unblocked */ void _Scheduler_simple_Unblock( - Scheduler_Control *scheduler, - Thread_Control *the_thread + const Scheduler_Control *scheduler, + Thread_Control *the_thread ); /** @@ -140,8 +145,8 @@ void _Scheduler_simple_Unblock( * @param[in] the_thread is the thread to be blocked */ void _Scheduler_simple_Extract( - Scheduler_Control *scheduler, - Thread_Control *the_thread + const Scheduler_Control *scheduler, + Thread_Control *the_thread ); /** @@ -152,8 +157,8 @@ void _Scheduler_simple_Extract( * @param[in] the_thread is the thread to be enqueued */ void _Scheduler_simple_Enqueue( - Scheduler_Control *scheduler, - Thread_Control *the_thread + const Scheduler_Control *scheduler, + Thread_Control *the_thread ); /** @@ -166,8 +171,8 @@ void _Scheduler_simple_Enqueue( * @param[in] the_thread is the thread to be blocked */ void _Scheduler_simple_Enqueue_first( - Scheduler_Control *scheduler, - Thread_Control *the_thread + const Scheduler_Control *scheduler, + Thread_Control *the_thread ); /** @@ -179,8 +184,8 @@ void _Scheduler_simple_Enqueue_first( * @param[in] the_thread - pointer to a thread control block */ void _Scheduler_simple_Ready_queue_enqueue( - Scheduler_Control *scheduler, - Thread_Control *the_thread + const Scheduler_Control *scheduler, + Thread_Control *the_thread ); /** @@ -193,8 +198,8 @@ void _Scheduler_simple_Ready_queue_enqueue( * @param[in] the_thread - pointer to a thread control block */ void _Scheduler_simple_Ready_queue_enqueue_first( - Scheduler_Control *scheduler, - Thread_Control *the_thread + const Scheduler_Control *scheduler, + Thread_Control *the_thread ); /**@}*/ |