diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-05-13 16:03:05 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-05-14 14:46:19 +0200 |
commit | beab7329fca655c93743fbb590d00bb4ea5a6d78 (patch) | |
tree | fbeb6b27f887b46a41f84acc64aecfce18686540 /cpukit/score/src/schedulercbsallocate.c | |
parent | score: Scheduler documentation (diff) | |
download | rtems-beab7329fca655c93743fbb590d00bb4ea5a6d78.tar.bz2 |
score: Introduce scheduler nodes
Rename scheduler per-thread information into scheduler nodes using
Scheduler_Node as the base type. Use inheritance for specialized
schedulers.
Move the scheduler specific states from the thread control block into
the scheduler node structure.
Validate the SMP scheduler node state transitions in case RTEMS_DEBUG is
defined.
Diffstat (limited to 'cpukit/score/src/schedulercbsallocate.c')
-rw-r--r-- | cpukit/score/src/schedulercbsallocate.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/cpukit/score/src/schedulercbsallocate.c b/cpukit/score/src/schedulercbsallocate.c index a6f89c35a9..6a29088eb6 100644 --- a/cpukit/score/src/schedulercbsallocate.c +++ b/cpukit/score/src/schedulercbsallocate.c @@ -18,25 +18,20 @@ #include "config.h" #endif -#include <rtems/system.h> -#include <rtems/config.h> -#include <rtems/score/scheduler.h> -#include <rtems/score/scheduleredf.h> -#include <rtems/score/schedulercbs.h> -#include <rtems/score/wkspace.h> +#include <rtems/score/schedulercbsimpl.h> bool _Scheduler_CBS_Allocate( const Scheduler_Control *scheduler, Thread_Control *the_thread ) { - Scheduler_CBS_Per_thread *schinfo = the_thread->scheduler_info; + Scheduler_CBS_Node *node = _Scheduler_CBS_Node_get( the_thread ); (void) scheduler; - schinfo->edf_per_thread.thread = the_thread; - schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; - schinfo->cbs_server = NULL; + node->Base.thread = the_thread; + node->Base.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN; + node->cbs_server = NULL; return true; } |