diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-06-10 16:13:37 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-06-23 09:53:59 +0200 |
commit | 8f0c7a46ed1edc5b2489bfd248942d6918836e3f (patch) | |
tree | 3ceb6d5a1c3133fc4412da974b13f2f92ff8e90d /cpukit/score/include/rtems/score/scheduler.h | |
parent | score: Use chain nodes for ready queue support (diff) | |
download | rtems-8f0c7a46ed1edc5b2489bfd248942d6918836e3f.tar.bz2 |
score: Decouple thread and scheduler nodes on SMP
Add a chain node to the scheduler node to decouple the thread and
scheduler nodes. It is now possible to enqueue a thread in a thread
wait queue and use its scheduler node at the same for other threads,
e.g. a resouce owner.
Diffstat (limited to 'cpukit/score/include/rtems/score/scheduler.h')
-rw-r--r-- | cpukit/score/include/rtems/score/scheduler.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h index 5be2c98dc3..831accb7ae 100644 --- a/cpukit/score/include/rtems/score/scheduler.h +++ b/cpukit/score/include/rtems/score/scheduler.h @@ -165,7 +165,24 @@ struct Scheduler_Control { * @brief Scheduler node for per-thread data. */ struct Scheduler_Node { - /* No fields yet */ +#if defined(RTEMS_SMP) + /** + * @brief Chain node for usage in various scheduler data structures. + * + * Strictly this is the wrong place for this field since the data structures + * to manage scheduler nodes belong to the particular scheduler + * implementation. Currently all SMP scheduler implementations use chains. + * The node is here to simplify things, just like the object node in the + * thread control block. It may be replaced with a union to add a red-black + * tree node in the future. + */ + Chain_Node Node; + + /** + * @brief The thread owning this node. + */ + Thread_Control *owner; +#endif }; /** |