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/include/rtems/score/thread.h | |
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/include/rtems/score/thread.h')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 248ae96850..0deeea065f 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -39,6 +39,8 @@ struct Scheduler_Control; +struct Scheduler_Node; + #ifdef __cplusplus extern "C" { #endif @@ -479,31 +481,6 @@ struct Thread_Control_struct { bool is_preemptible; #if defined(RTEMS_SMP) /** - * @brief This field is true if the thread is scheduled. - * - * A thread is scheduled if it is ready and the scheduler allocated a - * processor for it. A scheduled thread is assigned to exactly one - * processor. There are exactly processor count scheduled threads in the - * system. - */ - bool is_scheduled; - - /** - * @brief This field is true if the thread is in the air. - * - * A thread is in the air if it has an allocated processor (it is an - * executing or heir thread on exactly one processor) and it is not a member - * of the scheduled chain. The extract operation on a scheduled thread will - * produce threads in the air (see also _Thread_Set_transient()). The next - * enqueue or schedule operation will decide what to do based on this state - * indication. It can either place the thread back on the scheduled chain - * and the thread can keep its allocated processor, or it can take the - * processor away from the thread and give the processor to another thread of - * higher priority. - */ - bool is_in_the_air; - - /** * @brief The scheduler of this thread. */ const struct Scheduler_Control *scheduler; @@ -530,8 +507,10 @@ struct Thread_Control_struct { */ Thread_CPU_usage_t cpu_time_used; - /** This pointer holds per-thread data for the scheduler and ready queue. */ - void *scheduler_info; + /** + * @brief The scheduler node of this thread for the real scheduler. + */ + struct Scheduler_Node *scheduler_node; #ifdef RTEMS_SMP /** |