RTEMS
|
Thread scheduler control. More...
#include <thread.h>
Public Attributes | |
ISR_lock_Control | Lock |
Lock to protect the scheduler node change requests. | |
Thread_Scheduler_state | state |
The current scheduler state of this thread. | |
const struct _Scheduler_Control * | home_scheduler |
The home scheduler of this thread. | |
const struct _Scheduler_Control * | pinned_scheduler |
The pinned scheduler of this thread. | |
struct Per_CPU_Control * | cpu |
The processor assigned by the current scheduler. | |
Chain_Control | Wait_nodes |
Scheduler nodes immediately available to the thread by its home scheduler and due to thread queue ownerships. More... | |
Chain_Control | Scheduler_nodes |
Scheduler nodes immediately available to the schedulers for this thread. More... | |
Chain_Node | Help_node |
Node for the Per_CPU_Control::Threads_in_need_for_help chain. More... | |
size_t | helping_nodes |
Count of nodes scheduler nodes minus one. More... | |
Scheduler_Node * | requests |
List of pending scheduler node requests. More... | |
int | pin_level |
The thread pinning to current processor level. More... | |
Processor_mask | Affinity |
The thread processor affinity set. | |
Scheduler_Node * | nodes |
The scheduler nodes of this thread. More... | |
Chain_Node Thread_Scheduler_control::Help_node |
Node for the Per_CPU_Control::Threads_in_need_for_help chain.
This chain is protected by the Per_CPU_Control::Lock lock of the assigned processor.
size_t Thread_Scheduler_control::helping_nodes |
Scheduler_Node* Thread_Scheduler_control::nodes |
int Thread_Scheduler_control::pin_level |
The thread pinning to current processor level.
Must be touched only by the executing thread with thread dispatching disabled. If non-zero, then the thread is pinned to its current processor. The pin level is incremented and decremented by two. The least-significant bit indicates that the thread was pre-empted and must undo the pinning with respect to the scheduler once the level changes from three to one.
The thread pinning may be used to access per-processor data structures in critical sections with enabled thread dispatching, e.g. a pinned thread is allowed to block.
Thread pinning should be used only for short critical sections and not all the time. Thread pinning is a very low overhead operation in case the thread is not preempted during the pinning.
Scheduler_Node* Thread_Scheduler_control::requests |
Chain_Control Thread_Scheduler_control::Scheduler_nodes |
Scheduler nodes immediately available to the schedulers for this thread.
This chain is protected by the thread state lock.
This chain is never empty for normal threads (the only exception are idle threads associated with an online processor which is not used by a scheduler). In case a pinned scheduler is set for this thread, then the first scheduler node of this chain belongs to the pinned scheduler, otherwise the first scheduler node of this chain belongs to the home scheduler.
Chain_Control Thread_Scheduler_control::Wait_nodes |
Scheduler nodes immediately available to the thread by its home scheduler and due to thread queue ownerships.
This chain is protected by the thread wait lock.
This chain is never empty. The first scheduler node on the chain is the scheduler node of the home scheduler.