RTEMS
Public Attributes | List of all members
Thread_Scheduler_control Struct Reference

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_Controlhome_scheduler
 The home scheduler of this thread.
 
const struct _Scheduler_Controlpinned_scheduler
 The pinned scheduler of this thread.
 
struct Per_CPU_Controlcpu
 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_Noderequests
 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_Nodenodes
 The scheduler nodes of this thread. More...
 

Detailed Description

Thread scheduler control.

Definition at line 243 of file thread.h.

Member Data Documentation

◆ Help_node

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.

Definition at line 302 of file thread.h.

◆ helping_nodes

size_t Thread_Scheduler_control::helping_nodes

Count of nodes scheduler nodes minus one.

This chain is protected by the thread state lock.

Definition at line 309 of file thread.h.

◆ nodes

Scheduler_Node* Thread_Scheduler_control::nodes

The scheduler nodes of this thread.

Each thread has a scheduler node for each scheduler instance.

Definition at line 351 of file thread.h.

◆ pin_level

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.

See also
_Thread_Pin() and _Thread_Unpin().

Definition at line 338 of file thread.h.

◆ requests

Scheduler_Node* Thread_Scheduler_control::requests

List of pending scheduler node requests.

This list is protected by the thread scheduler lock.

Definition at line 316 of file thread.h.

◆ Scheduler_nodes

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.

Definition at line 294 of file thread.h.

◆ Wait_nodes

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.

Definition at line 279 of file thread.h.


The documentation for this struct was generated from the following file: