RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Data Fields
_Thread_Control Struct Reference

#include <thread.h>

Data Fields

Objects_Control Object
 
Thread_queue_Control Join_queue
 Thread queue for thread join operations and multi-purpose lock.
 
States_Control current_state
 
Priority_Node Real_priority
 The base priority of this thread in its home scheduler instance.
 
Thread_Scheduler_control Scheduler
 Scheduler related control.
 
Thread_Wait_information Wait
 
Thread_Timer_information Timer
 
Context_Control Registers
 This member contains the context of this thread.
 
bool is_idle
 
bool is_preemptible
 
bool is_fp
 
bool was_created_with_inherited_scheduler
 True, if the thread was created with an inherited scheduler (PTHREAD_INHERIT_SCHED), and false otherwise.
 
Thread_CPU_budget_control CPU_budget
 This member contains the CPU budget control used to manage the CPU budget of the thread.
 
Timestamp_Control cpu_time_used
 This member contains the amount of CPU time consumed by this thread since it was created.
 
Timestamp_Control cpu_time_used_at_last_reset
 This member contains the amount of CPU time consumed by this thread at the time of the last reset of the CPU usage by rtems_cpu_usage_reset().
 
Thread_Start_information Start
 
Thread_Action_control Post_switch_actions
 
Context_Control_fpfp_context
 
struct _reent * libc_reent
 
void * API_Extensions [THREAD_API_LAST+1]
 
Thread_Keys_information Keys
 The POSIX Keys information.
 
Thread_Life_control Life
 Thread life-cycle control.
 
Thread_Capture_control Capture
 
struct rtems_user_env_tuser_environment
 Pointer to an optional thread-specific POSIX user environment.
 
struct _pthread_cleanup_context * last_cleanup_context
 LIFO list of POSIX cleanup contexts.
 
struct User_extensions_Iteratorlast_user_extensions_iterator
 LIFO list of user extensions iterators.
 
void * extensions [RTEMS_ZERO_LENGTH_ARRAY]
 Variable length array of user extension pointers.
 

Detailed Description

This structure defines the Thread Control Block (TCB).

Uses a leading underscore in the structure name to allow forward declarations in standard header files provided by Newlib and GCC.

In case the second member changes (currently Join_queue), then the memset() in _Thread_Initialize() must be adjusted.

Field Documentation

◆ API_Extensions

void* _Thread_Control::API_Extensions[THREAD_API_LAST+1]

This array contains the API extension area pointers.

◆ current_state

States_Control _Thread_Control::current_state

This field is the current execution state of this thread.

◆ 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.

◆ is_fp

bool _Thread_Control::is_fp

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

◆ is_idle

bool _Thread_Control::is_idle

This field is true if the thread is an idle thread.

◆ is_preemptible

bool _Thread_Control::is_preemptible

This field is true if the thread is preemptible.

◆ Join_queue

Thread_queue_Control _Thread_Control::Join_queue

Thread queue for thread join operations and multi-purpose lock.

The lock of this thread queue is used for various purposes. It protects the following fields

See also
_Thread_State_acquire().

◆ 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

This field is the object management structure for each thread.

◆ Registers

Context_Control _Thread_Control::Registers

This member contains the context of this thread.

This member is placed directly after the end of the common block so that the structure offsets are as small as possible. This helps on instruction set architectures with a very limited range for intermediate values.

◆ Start

Thread_Start_information _Thread_Control::Start

This field contains information about the starting state of this thread.

◆ Timer

Thread_Timer_information _Thread_Control::Timer

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

◆ Wait

Thread_Wait_information _Thread_Control::Wait

This field is the blocking information for this thread.


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