RTEMS CPU Kit with SuperCore  4.11.2
Data Fields
Thread_Control Struct Reference

This structure defines the Thread Control Block (TCB). More...

#include <thread.h>

Collaboration diagram for Thread_Control:
Collaboration graph
[legend]

Data Fields

Objects_Control Object
 This field is the object management structure for each thread. More...
 
States_Control current_state
 This field is the current execution state of this thread. More...
 
Priority_Control current_priority
 This field is the current priority state of this thread. More...
 
Priority_Control real_priority
 This field is the base priority of this thread. More...
 
uint32_t priority_generation
 Generation of the current priority value. More...
 
bool priority_restore_hint
 Hints if a priority restore is necessary once the resource count changes from one to zero. More...
 
uint32_t resource_count
 This field is the number of mutexes currently held by this thread. More...
 
Thread_Wait_information Wait
 This field is the blocking information for this thread. More...
 
Watchdog_Control Timer
 This field is the Watchdog used to manage thread delays and timeouts. More...
 
bool is_preemptible
 This field is true if the thread is preemptible. More...
 
bool is_fp
 This field is true if the thread uses the floating point unit. More...
 
Thread_Scheduler_control Scheduler
 Scheduler related control.
 
uint32_t cpu_time_budget
 This field is the length of the time quantum that this thread is allowed to consume. More...
 
Thread_CPU_budget_algorithms budget_algorithm
 This field is the algorithm used to manage this thread's time quantum. More...
 
Thread_CPU_budget_algorithm_callout budget_callout
 This field is the method invoked with the budgeted time is consumed. More...
 
Thread_CPU_usage_t cpu_time_used
 This field is the amount of CPU time consumed by this thread since it was created.
 
Thread_Start_information Start
 This field contains information about the starting state of this thread.
 
Thread_Action_control Post_switch_actions
 
Context_Control Registers
 This field contains the context of this thread. More...
 
Context_Control_fpfp_context
 This field points to the floating point context for this thread. More...
 
struct _reent * libc_reent
 This field points to the newlib reentrancy structure for this thread. More...
 
void * API_Extensions [THREAD_API_LAST+1]
 This array contains the API extension area pointers. More...
 
rtems_task_variable_ttask_variables
 This field points to the set of per task variables. More...
 
Chain_Control Key_Chain
 This is the thread key value chain's control, which is used to track all key value for specific thread, and when thread exits, we can remove all key value for specific thread by iterating this chain, or we have to search a whole rbtree, which is inefficient.
 
Thread_Life_control Life
 Thread life-cycle control. More...
 
Thread_Capture_control Capture
 
void * extensions [RTEMS_ZERO_LENGTH_ARRAY]
 Variable length array of user extension pointers. More...
 

Detailed Description

This structure defines the Thread Control Block (TCB).

Field Documentation

◆ API_Extensions

void* Thread_Control::API_Extensions[THREAD_API_LAST+1]

◆ budget_algorithm

Thread_CPU_budget_algorithms Thread_Control::budget_algorithm

This field is the algorithm used to manage this thread's time quantum.

The algorithm may be specified as none which case, no limit is in place.

Referenced by _Scheduler_default_Tick(), _Thread_Do_dispatch(), and _Thread_Load_environment().

◆ budget_callout

Thread_CPU_budget_algorithm_callout Thread_Control::budget_callout

This field is the method invoked with the budgeted time is consumed.

Referenced by _Thread_Load_environment().

◆ cpu_time_budget

uint32_t Thread_Control::cpu_time_budget

This field is the length of the time quantum that this thread is allowed to consume.

The algorithm used to manage limits on CPU usage is specified by budget_algorithm.

Referenced by _POSIX_Threads_Sporadic_budget_callout(), and _POSIX_Threads_Sporadic_budget_TSR().

◆ current_priority

Priority_Control Thread_Control::current_priority

This field is the current priority state of this thread.

Writes to this field are only allowed in _Thread_Initialize() or via _Thread_Change_priority().

Referenced by _CORE_mutex_Initialize(), and _CORE_mutex_Seize_interrupt_trylock_body().

◆ current_state

States_Control Thread_Control::current_state

This field is the current execution state of this thread.

Referenced by _Scheduler_default_Tick(), and _Thread_Start().

◆ extensions

void* Thread_Control::extensions[RTEMS_ZERO_LENGTH_ARRAY]

Variable length array of user extension pointers.

The length is defined by the application via <rtems/confdefs.h>.

◆ fp_context

Context_Control_fp* Thread_Control::fp_context

This field points to the floating point context for this thread.

If NULL, the thread is integer only.

Referenced by _Thread_Load_environment().

◆ is_fp

bool Thread_Control::is_fp

This field is true if the thread uses the floating point unit.

◆ is_preemptible

bool Thread_Control::is_preemptible

This field is true if the thread is preemptible.

Referenced by _Scheduler_default_Tick(), and _Thread_Load_environment().

◆ libc_reent

struct _reent* Thread_Control::libc_reent

This field points to the newlib reentrancy structure for this thread.

◆ Life

Thread_Life_control Thread_Control::Life

Thread life-cycle control.

Control state changes triggered by thread restart and delete requests.

◆ Object

Objects_Control Thread_Control::Object

◆ priority_generation

uint32_t Thread_Control::priority_generation

Generation of the current priority value.

It is used in _Thread_Change_priority() to serialize the update of priority related data structures.

◆ priority_restore_hint

bool Thread_Control::priority_restore_hint

Hints if a priority restore is necessary once the resource count changes from one to zero.

This is an optimization to speed up the mutex surrender sequence in case no attempt to change the priority was made during the mutex ownership. On SMP configurations atomic fences must synchronize writes to Thread_Control::priority_restore_hint and Thread_Control::resource_count.

◆ real_priority

Priority_Control Thread_Control::real_priority

This field is the base priority of this thread.

Writes to this field are only allowed in _Thread_Initialize() or via _Thread_Change_priority().

◆ Registers

Context_Control Thread_Control::Registers

This field contains the context of this thread.

◆ resource_count

uint32_t Thread_Control::resource_count

This field is the number of mutexes currently held by this thread.

Referenced by _CORE_mutex_Initialize(), _CORE_mutex_Seize_interrupt_trylock_body(), and _Thread_Owns_resources().

◆ task_variables

rtems_task_variable_t* Thread_Control::task_variables

This field points to the set of per task variables.

◆ Timer

Watchdog_Control Thread_Control::Timer

This field is the Watchdog used to manage thread delays and timeouts.

◆ Wait

Thread_Wait_information Thread_Control::Wait

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