RTEMS CPU Kit with SuperCore
4.11.2
|
This structure defines the Thread Control Block (TCB). More...
#include <thread.h>
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_fp * | fp_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_t * | task_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... | |
This structure defines the Thread Control Block (TCB).
void* Thread_Control::API_Extensions[THREAD_API_LAST+1] |
This array contains the API extension area pointers.
Referenced by _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(), _POSIX_Thread_Exit(), _POSIX_Threads_cancel_run(), _POSIX_Threads_Sporadic_budget_callout(), _POSIX_Threads_Sporadic_budget_TSR(), rtems_event_receive(), rtems_event_system_receive(), rtems_signal_catch(), rtems_task_get_note(), and rtems_task_set_note().
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().
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().
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().
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().
States_Control Thread_Control::current_state |
This field is the current execution state of this thread.
Referenced by _Scheduler_default_Tick(), and _Thread_Start().
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>.
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().
bool Thread_Control::is_fp |
This field is true if the thread uses the floating point unit.
bool Thread_Control::is_preemptible |
This field is true if the thread is preemptible.
Referenced by _Scheduler_default_Tick(), and _Thread_Load_environment().
struct _reent* Thread_Control::libc_reent |
This field points to the newlib reentrancy structure for this thread.
Thread_Life_control Thread_Control::Life |
Thread life-cycle control.
Control state changes triggered by thread restart and delete requests.
Objects_Control Thread_Control::Object |
This field is the object management structure for each thread.
Referenced by _CORE_barrier_Release(), _Objects_Id_to_name(), _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(), _POSIX_Threads_Free(), _RTEMS_tasks_Free(), _Thread_MP_Free_proxy(), rtems_capture_record_task(), rtems_object_set_name(), rtems_stack_checker_begin_extension(), rtems_task_get_note(), rtems_task_self(), and rtems_task_set_note().
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.
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.
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().
Context_Control Thread_Control::Registers |
This field contains the context of this thread.
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().
rtems_task_variable_t* Thread_Control::task_variables |
This field points to the set of per task variables.
Watchdog_Control Thread_Control::Timer |
This field is the Watchdog used to manage thread delays and timeouts.
Thread_Wait_information Thread_Control::Wait |
This field is the blocking information for this thread.
Referenced by _CORE_mutex_Seize_interrupt_trylock_body(), _Thread_Wait_restore_default_operations(), _Thread_Wait_set_operations(), _Thread_Wait_set_queue(), and _Thread_Wait_set_timeout_code().