RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Modules | Files | Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
Thread Handler

This group contains the Thread Handler implementation. More...

Modules

 Thread Handler Multiprocessing (MP) Support
 This group contains the implementation to support the Thread Handler in multiprocessing (MP) configurations.
 

Files

file  thread.h
 This header file provides interfaces of the Thread Handler which are used by the implementation and the Application Configuration.
 
file  threadcpubudget.h
 This header file provides interfaces used to implement the CPU budget management of threads.
 
file  threaddispatch.h
 This header file provides the interfaces of the Thread Handler related to thread dispatching.
 
file  threadidledata.h
 This header file provides data structures used by the implementation and the Application Configuration to define _Thread_Idle_stack_size and _Thread_Idle_body.
 
file  threadimpl.h
 This header file provides interfaces of the Thread Handler which are only used by the implementation.
 
file  iterateoverthreads.c
 This source file contains the implementation of rtems_iterate_over_all_threads().
 
file  thread.c
 This source file contains static assertions related to the Thread Handler and the implementation of _Thread_Initialize_information() and _Thread_Handler_initialization().
 
file  threadallocateunlimited.c
 This source file contains the implementation of _Thread_Extend_information().
 
file  threadchangepriority.c
 This source file contains the implementation of _Thread_Priority_add(), _Thread_Priority_and_sticky_update(), _Thread_Priority_changed(), _Thread_Priority_perform_actions(), _Thread_Priority_remove(), _Thread_Priority_replace(), and _Thread_Priority_update().
 
file  threadclearstate.c
 This source file contains the implementation of _Thread_Clear_state_locked() and _Thread_Clear_state().
 
file  threadcreateidle.c
 This source file contains the implementation of _Thread_Create_idle().
 
file  threaddispatch.c
 This source file contains the definition of _Thread_Allocated_fp and _User_extensions_Switches_list and the implementation of _Thread_Dispatch_direct(), _Thread_Dispatch_enable(), and _Thread_Do_dispatch().
 
file  threadentryadaptoridle.c
 This source file contains the implementation of _Thread_Entry_adaptor_idle().
 
file  threadentryadaptornumeric.c
 This source file contains the implementation of _Thread_Entry_adaptor_numeric().
 
file  threadentryadaptorpointer.c
 This source file contains the implementation of _Thread_Entry_adaptor_pointer().
 
file  threadexhausttimeslice.c
 This source file contains the definition of _Thread_CPU_budget_exhaust_timeslice and the implementation of _Thread_CPU_budget_do_nothing().
 
file  threadget.c
 This source file contains the implementation of _Thread_Get().
 
file  threadgetcputimeused.c
 This source file contains the implementation of _Thread_Get_CPU_time_used() and _Thread_Get_CPU_time_used_locked().
 
file  threadgetcputimeusedafterreset.c
 This source file contains the implementation of _Thread_Get_CPU_time_used_after_last_reset().
 
file  threadhandler.c
 This source file contains the definition of _Thread_Global_constructor and the implementation of _Thread_Handler().
 
file  threadidledefault.c
 This source file contains the default definition of _Thread_Idle_body.
 
file  threadinitialize.c
 This source file contains the implementation of _Thread_Initialize().
 
file  threaditerate.c
 This source file contains the implementation of _Thread_Iterate().
 
file  threadloadenv.c
 This source file contains the implementation of _Thread_Load_environment().
 
file  threadname.c
 This source file contains the implementation of _Thread_Set_name() and _Thread_Get_name().
 
file  threadplaindispatch.c
 This source file contains the implementation of _Thread_Dispatch().
 
file  threadresettimeslice.c
 This source file contains the definition of _Thread_CPU_budget_reset_timeslice and the implementation of _Thread_CPU_budget_consume_and_yield() and _Thread_CPU_budget_set_to_ticks_per_timeslice().
 
file  threadrestart.c
 This source file contains the implementation of _Thread_Cancel(), _Thread_Change_life(), _Thread_Close(), _Thread_Exit(), _Thread_Join(), _Thread_Kill_zombies(), _Thread_Restart(), and _Thread_Set_life_protection().
 
file  threadscheduler.c
 This source file contains the implementation of _Thread_Scheduler_process_requests().
 
file  threadselfid.c
 This source file contains the implementation of _Thread_Self_id().
 
file  threadsetstate.c
 This source file contains the implementation of _Thread_Set_state_locked() and _Thread_Set_state.
 
file  threadstart.c
 This source file contains the implementation of _Thread_Start().
 
file  threadstartmultitasking.c
 This source file contains the implementation of _Thread_Start_multitasking().
 
file  threadtimeout.c
 This source file contains the implementation of _Thread_Continue() and _Thread_Timeout().
 
file  threadunpin.c
 This source file contains the implementation of _Thread_Do_unpin().
 
file  threadwaitgetid.c
 This source file contains the implementation of _Thread_Wait_get_id().
 
file  threadyield.c
 This source file contains the implementation of _Thread_Yield().
 

Data Structures

struct  Thread_Entry_idle
 Data for idle thread entry. More...
 
struct  Thread_Entry_numeric
 Data for thread entry with one numeric argument and no return value. More...
 
struct  Thread_Entry_pointer
 Data for thread entry with one pointer argument and a pointer return value. More...
 
struct  Thread_Entry_information
 Thread entry information. More...
 
struct  Thread_CPU_budget_operations
 This structure contains operations which manage the CPU budget of a thread. More...
 
struct  Thread_CPU_budget_control
 This structure is used to control the CPU budget of a thread. More...
 
struct  Thread_Start_information
 
struct  Thread_Scheduler_control
 Thread scheduler control. More...
 
union  Thread_Wait_information_Object_argument_type
 Union type to hold a pointer to an immutable or a mutable object. More...
 
struct  Thread_Wait_information
 Information required to manage a thread while it is blocked. More...
 
struct  Thread_Timer_information
 Information required to manage a thread timer. More...
 
struct  Thread_Proxy_control
 
struct  Thread_Action
 Thread action. More...
 
struct  Thread_Keys_information
 Per-thread information for POSIX Keys. More...
 
struct  Thread_Action_control
 Control block to manage thread actions. More...
 
struct  Thread_Life_control
 Thread life control. More...
 
struct  Thread_Capture_control
 
struct  _Thread_Control
 
struct  Thread_Control_add_on
 Thread control add-on. More...
 
struct  Thread_Information
 The thread object information. More...
 
struct  Thread_Zombie_registry
 The thread zombie registry is used to register threads in the STATES_ZOMBIE state. More...
 
struct  Thread_Configuration
 The configuration of a new thread to initialize. More...
 

Macros

#define THREAD_API_FIRST   THREAD_API_RTEMS
 
#define THREAD_API_LAST   THREAD_API_POSIX
 
#define THREAD_LIFE_PROTECTED   0x1U
 Indicates that the thread life is protected.
 
#define THREAD_LIFE_RESTARTING   0x2U
 Indicates that thread is restarting.
 
#define THREAD_LIFE_TERMINATING   0x4U
 Indicates that thread is terminating.
 
#define THREAD_LIFE_CHANGE_DEFERRED   0x8U
 Indicates that thread life changes are deferred.
 
#define THREAD_LIFE_DETACHED   0x10U
 Indicates that thread is detached.
 
#define THREAD_DEFAULT_MAXIMUM_NAME_SIZE   16
 The default maximum size of a thread name in characters (including the terminating '\0' character).
 
#define _Thread_queue_Heads_size   sizeof(Thread_queue_Heads)
 Size of the thread queue heads of a particular application.
 
#define THREAD_INFORMATION_DEFINE_ZERO(name, api, cls)
 
#define THREAD_INFORMATION_DEFINE(name, api, cls, max)
 
#define RTEMS_SCORE_ROBUST_THREAD_DISPATCH
 Enables a robust thread dispatch.
 
#define THREAD_WAIT_STATE_MASK   0xffU
 Mask to get the thread wait state flags.
 
#define THREAD_WAIT_STATE_READY   0x0U
 Indicates that the thread does not wait on something.
 
#define THREAD_WAIT_STATE_INTEND_TO_BLOCK   0x1U
 Indicates that the thread begins with the blocking operation.
 
#define THREAD_WAIT_STATE_BLOCKED   0x2U
 Indicates that the thread completed the blocking operation.
 
#define THREAD_WAIT_CLASS_MASK   0xff00U
 Mask to get the thread wait class flags.
 
#define THREAD_WAIT_CLASS_EVENT   0x100U
 Indicates that the thread waits for an event.
 
#define THREAD_WAIT_CLASS_SYSTEM_EVENT   0x200U
 Indicates that the thread waits for a system event.
 
#define THREAD_WAIT_CLASS_OBJECT   0x400U
 Indicates that the thread waits for an object.
 
#define THREAD_WAIT_CLASS_PERIOD   0x800U
 Indicates that the thread waits for a period.
 

Typedefs

typedef CPU_Uint32ptr Thread_Entry_numeric_type
 Type of the numeric argument of a thread entry function with at least one numeric argument.
 
typedef unsigned int Thread_Wait_flags
 This type is able to contain several flags used to control the wait class and state of a thread.
 
typedef struct Thread_Action Thread_Action
 
typedef void(* Thread_Action_handler) (Thread_Control *the_thread, Thread_Action *action, ISR_lock_Context *lock_context)
 This type defines the prototype of thread action handlers.
 
typedef unsigned int Thread_Life_state
 This type represents the thread life state.
 
typedef void(* rtems_per_thread_routine) (Thread_Control *)
 
typedef struct Thread_Configured_control Thread_Configured_control
 The configured thread control block.
 
typedef Thread_queue_Heads Thread_queue_Configured_heads
 The configured thread queue heads.
 
typedef void *(* Thread_Idle_body) (uintptr_t)
 The idle thread body type.
 
typedef bool(* Thread_Visitor) (Thread_Control *the_thread, void *arg)
 

Enumerations

enum  Thread_APIs { THREAD_API_RTEMS , THREAD_API_POSIX }
 
enum  Thread_Cancel_state { THREAD_CANCEL_DONE , THREAD_CANCEL_IN_PROGRESS }
 Indicates the resulting state of _Thread_Cancel(). More...
 

Functions

void rtems_iterate_over_all_threads (rtems_per_thread_routine routine) RTEMS_DEPRECATED
 Deprecated, use rtems_task_iterate() instead.
 
Objects_Control_Thread_Allocate_unlimited (Objects_Information *information)
 Return an inactive thread object or NULL.
 
void _Thread_CPU_budget_do_nothing (Thread_Control *the_thread)
 Does nothing.
 
void _Thread_CPU_budget_set_to_ticks_per_timeslice (Thread_Control *the_thread)
 Sets the available CPU budget of the thread to the configured clock ticks per timeslice.
 
void _Thread_CPU_budget_consume_and_yield (Thread_Control *the_thread)
 Consumes one time quantum of the available CPU budget of the thread and yields the thread if the available CPU budget is fully consumed.
 
void _Thread_Dispatch (void)
 Performs a thread dispatch if necessary.
 
void _Thread_Dispatch_direct (Per_CPU_Control *cpu_self)
 Directly do a thread dispatch.
 
RTEMS_NO_RETURN void _Thread_Dispatch_direct_no_return (Per_CPU_Control *cpu_self)
 Directly do a thread dispatch and do not return.
 
void _Thread_Do_dispatch (Per_CPU_Control *cpu_self, ISR_Level level)
 Performs a thread dispatch on the current processor.
 
void _Thread_Dispatch_enable (Per_CPU_Control *cpu_self)
 Enables thread dispatching.
 
void _Thread_Iterate (Thread_Visitor visitor, void *arg)
 Calls the visitor with all threads and the given argument until it is done.
 
void _Thread_Initialize_information (Thread_Information *information)
 Initializes the thread information.
 
void _Thread_Handler_initialization (void)
 Initializes thread handler.
 
void _Thread_Create_idle (void)
 Creates idle thread.
 
RTEMS_NO_RETURN void _Thread_Start_multitasking (void)
 Starts thread multitasking.
 
Status_Control _Thread_Initialize (Thread_Information *information, Thread_Control *the_thread, const Thread_Configuration *config)
 Initializes thread.
 
void _Thread_Free (Thread_Information *information, Thread_Control *the_thread)
 Frees the thread.
 
Status_Control _Thread_Start (Thread_Control *the_thread, const Thread_Entry_information *entry, ISR_lock_Context *lock_context)
 Starts the specified thread.
 
Status_Control _Thread_Restart (Thread_Control *the_thread, const Thread_Entry_information *entry, ISR_lock_Context *lock_context)
 Restarts the thread.
 
void _Thread_Yield (Thread_Control *executing)
 Yields the currently executing thread.
 
Thread_Life_state _Thread_Change_life (Thread_Life_state life_states_to_clear, Thread_Life_state life_states_to_set, Thread_Life_state ignored_life_states)
 Changes the life of currently executing thread.
 
Thread_Life_state _Thread_Set_life_protection (Thread_Life_state state)
 Set the thread to life protected.
 
void _Thread_Kill_zombies (void)
 Kills all zombie threads in the system.
 
RTEMS_NO_RETURN void _Thread_Exit (void *exit_value, Thread_Life_state life_states_to_set)
 Exits the currently executing thread.
 
Status_Control _Thread_Join (Thread_Control *the_thread, States_Control waiting_for_join, Thread_Control *executing, Thread_queue_Context *queue_context)
 Joins the currently executing thread with the thread.
 
Thread_Cancel_state _Thread_Cancel (Thread_Control *the_thread, Thread_Control *executing, Thread_Life_state life_states_to_clear)
 Cancels the thread.
 
Status_Control _Thread_Close (Thread_Control *the_thread, Thread_Control *executing, Thread_queue_Context *queue_context)
 Closes the thread.
 
States_Control _Thread_Clear_state_locked (Thread_Control *the_thread, States_Control state)
 Clears the specified thread state without locking the lock context.
 
States_Control _Thread_Clear_state (Thread_Control *the_thread, States_Control state)
 Clears the specified thread state.
 
States_Control _Thread_Set_state_locked (Thread_Control *the_thread, States_Control state)
 Sets the specified thread state without locking the lock context.
 
States_Control _Thread_Set_state (Thread_Control *the_thread, States_Control state)
 Sets the specified thread state.
 
void _Thread_Load_environment (Thread_Control *the_thread)
 Initializes enviroment for a thread.
 
void _Thread_Entry_adaptor_idle (Thread_Control *executing)
 Calls the start kinds idle entry of the thread.
 
void _Thread_Entry_adaptor_numeric (Thread_Control *executing)
 Calls the start kinds numeric entry of the thread.
 
void _Thread_Entry_adaptor_pointer (Thread_Control *executing)
 Calls the start kinds pointer entry of the thread.
 
void _Thread_Handler (void)
 Wrapper function for all threads.
 
void _Thread_Priority_perform_actions (Thread_Control *start_of_path, Thread_queue_Context *queue_context)
 Checks if the thread is owner of the lock of the join queue.
 
void _Thread_Priority_add (Thread_Control *the_thread, Priority_Node *priority_node, Thread_queue_Context *queue_context)
 Adds the specified thread priority node to the corresponding thread priority aggregation.
 
void _Thread_Priority_remove (Thread_Control *the_thread, Priority_Node *priority_node, Thread_queue_Context *queue_context)
 Removes the specified thread priority node from the corresponding thread priority aggregation.
 
void _Thread_Priority_changed (Thread_Control *the_thread, Priority_Node *priority_node, Priority_Group_order priority_group_order, Thread_queue_Context *queue_context)
 Propagates a thread priority value change in the specified thread priority node to the corresponding thread priority aggregation.
 
void _Thread_Priority_update (Thread_queue_Context *queue_context)
 Updates the priority of all threads in the set.
 
Thread_Control_Thread_Get (Objects_Id id, ISR_lock_Context *lock_context)
 Gets a thread by its identifier.
 
Objects_Id _Thread_Self_id (void)
 Gets the identifier of the calling thread.
 
Timestamp_Control _Thread_Get_CPU_time_used (Thread_Control *the_thread)
 Updates the used cpu time for the heir and dispatches a new heir.
 
Timestamp_Control _Thread_Get_CPU_time_used_locked (Thread_Control *the_thread)
 Gets the used processor time of the thread throughout its entire lifetime if the caller already acquired the thread state and home scheduler locks.
 
Timestamp_Control _Thread_Get_CPU_time_used_after_last_reset (Thread_Control *the_thread)
 Gets the used processor time of the thread after the last CPU usage reset.
 
Objects_Id _Thread_Wait_get_id (const Thread_Control *the_thread)
 Returns the object identifier of the object containing the current thread wait queue.
 
void _Thread_Continue (Thread_Control *the_thread, Status_Control status)
 Cancels a blocking operation so that the thread can continue its execution.
 
void _Thread_Timeout (Watchdog_Control *the_watchdog)
 General purpose thread wait timeout.
 
Status_Control _Thread_Set_name (Thread_Control *the_thread, const char *name)
 Sets the name of the thread.
 
size_t _Thread_Get_name (const Thread_Control *the_thread, char *buffer, size_t buffer_size)
 Gets the name of the thread.
 

Variables

const Thread_Control_add_on _Thread_Control_add_ons []
 Thread control add-ons.
 
const size_t _Thread_Control_add_on_count
 Thread control add-on count.
 
const size_t _Thread_Initial_thread_count
 Count of configured threads.
 
const size_t _Thread_Maximum_name_size
 Maximum size of a thread name in characters (including the terminating '\0' character).
 
const size_t _Thread_Maximum_TLS_size
 If this constant is greater than zero, then it defines the maximum thread-local storage size, otherwise the thread-local storage size is defined by the linker depending on the thread-local storage objects used by the application in the statically-linked executable.
 
Thread_Information _Thread_Information
 The internal thread objects information.
 
const Thread_CPU_budget_operations _Thread_CPU_budget_exhaust_timeslice
 These CPU budget operations allocate timeslices to the thread.
 
const Thread_CPU_budget_operations _Thread_CPU_budget_reset_timeslice
 These CPU budget operations allocate timeslices to the thread.
 
const size_t _Thread_Idle_stack_size
 The idle thread stack size in bytes.
 
const Thread_Idle_body _Thread_Idle_body
 The idle thread body.
 
Thread_Zombie_registry _Thread_Zombies
 This object is a registry for threads in the STATES_ZOMBIE state.
 
Objects_Id _Thread_Global_constructor
 Object identifier of the global constructor thread.
 
Thread_Control_Thread_Allocated_fp
 

Detailed Description

This group contains the Thread Handler implementation.

This handler encapsulates functionality related to the management of threads. This includes the creation, deletion, and scheduling of threads.

The following variables are maintained as part of the per cpu data structure.

Macro Definition Documentation

◆ _Thread_queue_Heads_size

#define _Thread_queue_Heads_size   sizeof(Thread_queue_Heads)

Size of the thread queue heads of a particular application.

In SMP configurations, this value is provided via <rtems/confdefs.h>.

◆ RTEMS_SCORE_ROBUST_THREAD_DISPATCH

#define RTEMS_SCORE_ROBUST_THREAD_DISPATCH

Enables a robust thread dispatch.

On each change of the thread dispatch disable level from one to zero the interrupt status is checked. In case interrupts are disabled and SMP is enabled or the CPU port needs it, then the system terminates with the fatal internal error INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT.

◆ THREAD_API_FIRST

#define THREAD_API_FIRST   THREAD_API_RTEMS

This macro defines the first API which has threads.

◆ THREAD_API_LAST

#define THREAD_API_LAST   THREAD_API_POSIX

This macro defines the last API which has threads.

◆ THREAD_DEFAULT_MAXIMUM_NAME_SIZE

#define THREAD_DEFAULT_MAXIMUM_NAME_SIZE   16

The default maximum size of a thread name in characters (including the terminating '\0' character).

This is the default value for the application configuration option CONFIGURE_MAXIMUM_THREAD_NAME_SIZE.

◆ THREAD_INFORMATION_DEFINE

#define THREAD_INFORMATION_DEFINE (   name,
  api,
  cls,
  max 
)
Value:
static Objects_Control * \
name##_Local_table[ _Objects_Maximum_per_allocation( max ) ]; \
static RTEMS_SECTION( ".noinit.rtems.content.objects." #name ) \
Thread_Configured_control \
name##_Objects[ _Objects_Maximum_per_allocation( max ) ]; \
static RTEMS_SECTION( ".noinit.rtems.content.objects." #name ) \
Thread_queue_Configured_heads \
name##_Heads[ _Objects_Maximum_per_allocation( max ) ]; \
Thread_Information name##_Information = { \
{ \
_Objects_Build_id( api, cls, 1, _Objects_Maximum_per_allocation( max ) ), \
name##_Local_table, \
_Objects_Is_unlimited( max ) ? \
_Objects_Is_unlimited( max ) ? \
0, \
_Objects_Is_unlimited( max ) ? _Objects_Maximum_per_allocation( max ) : 0, \
CHAIN_INITIALIZER_EMPTY( name##_Information.Objects.Inactive ), \
NULL, \
NULL, \
&name##_Objects[ 0 ].Control.Object \
OBJECTS_INFORMATION_MP( name##_Information.Objects, NULL ) \
}, { \
&name##_Heads[ 0 ] \
} \
}
#define RTEMS_SECTION(_section)
Instructs the compiler to place the variable or function in the section.
Definition: basedefs.h:411
#define CHAIN_INITIALIZER_EMPTY(name)
Chain initializer for an empty chain with designator name.
Definition: chainimpl.h:59
void _Objects_Free_static(Objects_Information *information, Objects_Control *the_object)
Free the object.
Definition: objectfreestatic.c:44
Objects_Control * _Objects_Allocate_static(Objects_Information *information)
Return an inactive object or NULL.
Definition: objectallocatestatic.c:44
#define OBJECTS_NO_STRING_NAME
Constant for the object information string name length to indicate that this object class has no stri...
Definition: objectdata.h:123
void _Objects_Free_unlimited(Objects_Information *information, Objects_Control *the_object)
Free the object.
Definition: objectfree.c:45
Objects_Control * _Thread_Allocate_unlimited(Objects_Information *information)
Return an inactive thread object or NULL.
Definition: threadallocateunlimited.c:70
struct Thread_Configured_control Thread_Configured_control
The configured thread control block.
Definition: thread.h:1105
Definition: objectdata.h:61
The thread object information.
Definition: thread.h:1133

◆ THREAD_INFORMATION_DEFINE_ZERO

#define THREAD_INFORMATION_DEFINE_ZERO (   name,
  api,
  cls 
)
Value:
Thread_Information name##_Information = { \
{ \
_Objects_Build_id( api, cls, 1, 0 ), \
NULL, \
NULL, \
0, \
0, \
0, \
0, \
CHAIN_INITIALIZER_EMPTY( name##_Information.Objects.Inactive ), \
NULL, \
NULL, \
NULL \
OBJECTS_INFORMATION_MP( name##_Information.Objects, NULL ), \
}, { \
NULL \
} \
}
Objects_Control * _Objects_Allocate_none(Objects_Information *information)
Always return NULL.
Definition: objectallocatenone.c:43

◆ THREAD_LIFE_CHANGE_DEFERRED

#define THREAD_LIFE_CHANGE_DEFERRED   0x8U

Indicates that thread life changes are deferred.

If this flag is set, then the thread restart or delete requests are deferred until the protection and deferred change flags are cleared. It is used by pthread_setcanceltype().

◆ THREAD_LIFE_DETACHED

#define THREAD_LIFE_DETACHED   0x10U

Indicates that thread is detached.

If this flag is set, then the thread is detached. Detached threads do not wait during termination for other threads to join. See rtems_task_delete(), rtems_task_exit(), and pthread_detach().

◆ THREAD_LIFE_PROTECTED

#define THREAD_LIFE_PROTECTED   0x1U

Indicates that the thread life is protected.

If this flag is set, then the thread restart or delete requests are deferred until the protection and deferred change flags are cleared. It is used by _Thread_Set_life_protection().

◆ THREAD_LIFE_RESTARTING

#define THREAD_LIFE_RESTARTING   0x2U

Indicates that thread is restarting.

If this flag is set, then a thread restart request is in pending. See _Thread_Restart_self() and _Thread_Restart_other().

◆ THREAD_LIFE_TERMINATING

#define THREAD_LIFE_TERMINATING   0x4U

Indicates that thread is terminating.

If this flag is set, then a thread termination request is in pending. See _Thread_Exit() and _Thread_Cancel().

◆ THREAD_WAIT_STATE_INTEND_TO_BLOCK

#define THREAD_WAIT_STATE_INTEND_TO_BLOCK   0x1U

Indicates that the thread begins with the blocking operation.

A blocking operation consists of an optional watchdog initialization and the setting of the appropriate thread blocking state with the corresponding scheduler block operation.

◆ THREAD_WAIT_STATE_READY

#define THREAD_WAIT_STATE_READY   0x0U

Indicates that the thread does not wait on something.

In this wait state, the wait class is zero. This wait state is set initially by _Thread_Initialize() and after each wait operation once the thread is ready again.

Typedef Documentation

◆ Thread_Action_handler

typedef void(* Thread_Action_handler) (Thread_Control *the_thread, Thread_Action *action, ISR_lock_Context *lock_context)

This type defines the prototype of thread action handlers.

The thread action handler will be called with interrupts disabled and a corresponding lock acquired, e.g. _Thread_State_acquire(). The handler may release the corresponding lock, e.g. _Thread_State_release(). If the lock is released, it shall be acquired before the handler returns using the lock context. The lock may be used to protect private data used by the action.

Since the action is passed to the handler additional data may be accessed via RTEMS_CONTAINER_OF().

Parameters
[in,out]the_threadis the thread performing the action.
[in,out]actionis the thread action.
[in,out]lock_contextis the lock context to use for the optional lock release and acquire.

◆ Thread_Configured_control

The configured thread control block.

This type is defined in <rtems/confdefs.h> and depends on the application configuration.

◆ Thread_Entry_numeric_type

Type of the numeric argument of a thread entry function with at least one numeric argument.

This numeric argument type designates an unsigned integer type with the property that any valid pointer to void can be converted to this type and then converted back to a pointer to void. The result will compare equal to the original pointer.

◆ Thread_Life_state

typedef unsigned int Thread_Life_state

This type represents the thread life state.

The thread life state is orthogonal to the thread state used for synchronization primitives and blocking operations. The thread life state reflects changes triggered by thread restart and delete requests.

The individual state flags must be a power of two to allow use of bit operations to manipulate and evaluate the thread life state.

◆ Thread_queue_Configured_heads

The configured thread queue heads.

In SMP configurations, this type is defined in <rtems/confdefs.h> and depends on the application configuration.

◆ Thread_Wait_flags

typedef unsigned int Thread_Wait_flags

This type is able to contain several flags used to control the wait class and state of a thread.

The mutually exclusive wait class flags are

The mutually exclusive wait state flags are

Enumeration Type Documentation

◆ Thread_APIs

The following record defines the control block used to manage each thread.

Note
It is critical that proxies and threads have identical memory images for the shared part.
Enumerator
THREAD_API_RTEMS 

This value is for the Classic RTEMS API.

THREAD_API_POSIX 

This value is for the POSIX API.

◆ Thread_Cancel_state

Indicates the resulting state of _Thread_Cancel().

Enumerator
THREAD_CANCEL_DONE 

Indicates that the thread cancel operation is done.

THREAD_CANCEL_IN_PROGRESS 

Indicates that the thread cancel operation is in progress.

The cancelled thread is terminating. It may be joined.

Function Documentation

◆ _Thread_Allocate_unlimited()

Objects_Control * _Thread_Allocate_unlimited ( Objects_Information information)

Return an inactive thread object or NULL.

Return values
NULLNo inactive object is available.
objectAn inactive object.

◆ _Thread_Cancel()

Thread_Cancel_state _Thread_Cancel ( Thread_Control the_thread,
Thread_Control executing,
Thread_Life_state  life_states_to_clear 
)

Cancels the thread.

Parameters
[in,out]the_threadis the thread to cancel.
[in,out]executingis the currently executing thread.
[in,out]life_states_to_clearis the set of thread life states to clear for the thread to cancel.

◆ _Thread_Change_life()

Thread_Life_state _Thread_Change_life ( Thread_Life_state  life_states_to_clear,
Thread_Life_state  life_states_to_set,
Thread_Life_state  ignored_life_states 
)

Changes the life of currently executing thread.

Parameters
life_states_to_clearare the thread life states to clear.
life_states_to_setare the thread life states to set.
ignored_life_statesare the ignored thread life states.
Returns
Returns the thread life state before the changes.

◆ _Thread_Clear_state()

States_Control _Thread_Clear_state ( Thread_Control the_thread,
States_Control  state 
)

Clears the specified thread state.

In the case the previous state is a non-ready state and the next state is the ready state, then the thread is unblocked by the scheduler.

Parameters
[in,out]the_threadThe thread.
stateThe state to clear. It must not be zero.
Returns
The previous state.

◆ _Thread_Clear_state_locked()

States_Control _Thread_Clear_state_locked ( Thread_Control the_thread,
States_Control  state 
)

Clears the specified thread state without locking the lock context.

In the case the previous state is a non-ready state and the next state is the ready state, then the thread is unblocked by the scheduler.

Parameters
[in,out]the_threadThe thread.
stateThe state to clear. It must not be zero.
Returns
The thread's previous state.

◆ _Thread_Close()

Status_Control _Thread_Close ( Thread_Control the_thread,
Thread_Control executing,
Thread_queue_Context queue_context 
)

Closes the thread.

Closes the thread object and starts the thread termination sequence. In case the executing thread is not terminated, then this function waits until the terminating thread reached the zombie state.

Parameters
the_threadis the thread to close.
[in,out]executingis the currently executing thread.
[in,out]queue_contextis the thread queue context. The caller shall have disabled interrupts using the thread queue context.
Return values
STATUS_SUCCESSFULThe operation was successful.
STATUS_DEADLOCKA deadlock occurred.

◆ _Thread_Continue()

void _Thread_Continue ( Thread_Control the_thread,
Status_Control  status 
)

Cancels a blocking operation so that the thread can continue its execution.

In case this function actually cancelled the blocking operation, then the thread wait return code is set to the specified status.

A specialization of this function is _Thread_Timeout().

Parameters
[in,out]the_threadThe thread.
statusThe thread wait status.

◆ _Thread_CPU_budget_consume_and_yield()

void _Thread_CPU_budget_consume_and_yield ( Thread_Control the_thread)

Consumes one time quantum of the available CPU budget of the thread and yields the thread if the available CPU budget is fully consumed.

While the thread enabled the non-preemptive mode or is not ready, no time quantum is consumed.

Parameters
the_threadis the thread to operate on.

◆ _Thread_CPU_budget_do_nothing()

void _Thread_CPU_budget_do_nothing ( Thread_Control the_thread)

Does nothing.

Parameters
the_threadis an unused parameter.

◆ _Thread_CPU_budget_set_to_ticks_per_timeslice()

void _Thread_CPU_budget_set_to_ticks_per_timeslice ( Thread_Control the_thread)

Sets the available CPU budget of the thread to the configured clock ticks per timeslice.

Parameters
the_threadis the thread to set the available CPU budget.

◆ _Thread_Create_idle()

void _Thread_Create_idle ( void  )

Creates idle thread.

This routine creates the idle thread.

Warning
No thread should be created before this one.

◆ _Thread_Dispatch()

void _Thread_Dispatch ( void  )

Performs a thread dispatch if necessary.

This routine is responsible for transferring control of the processor from the executing thread to the heir thread. Once the heir is running an attempt is made to run the pending post-switch thread actions.

As part of this process, it is responsible for the following actions

  • update timing information of the executing thread,
  • save the context of the executing thread,
  • invokation of the thread switch user extensions,
  • restore the context of the heir thread, and
  • run of pending post-switch thread actions of the resulting executing thread.

On entry the thread dispatch level must be equal to zero.

◆ _Thread_Dispatch_direct()

void _Thread_Dispatch_direct ( Per_CPU_Control cpu_self)

Directly do a thread dispatch.

Must be called with a thread dispatch disable level of one, otherwise the INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL will occur. This function is useful for operations which synchronously block, e.g. self restart, self deletion, yield, sleep.

Parameters
cpu_selfThe current processor.
See also
_Thread_Dispatch().

◆ _Thread_Dispatch_direct_no_return()

RTEMS_NO_RETURN void _Thread_Dispatch_direct_no_return ( Per_CPU_Control cpu_self)

Directly do a thread dispatch and do not return.

Parameters
cpu_selfis the current processor.
See also
_Thread_Dispatch_direct().

◆ _Thread_Dispatch_enable()

void _Thread_Dispatch_enable ( Per_CPU_Control cpu_self)

Enables thread dispatching.

May perform a thread dispatch if necessary as a side-effect.

Parameters
[in,out]cpu_selfThe current processor.

◆ _Thread_Do_dispatch()

void _Thread_Do_dispatch ( Per_CPU_Control cpu_self,
ISR_Level  level 
)

Performs a thread dispatch on the current processor.

On entry the thread dispatch disable level must be equal to one and interrupts must be disabled.

This function assumes that a thread dispatch is necessary.

Parameters
cpu_selfThe current processor.
levelThe previous interrupt level.
See also
_Thread_Dispatch().

◆ _Thread_Entry_adaptor_idle()

void _Thread_Entry_adaptor_idle ( Thread_Control executing)

Calls the start kinds idle entry of the thread.

Parameters
executingThe currently executing thread.

◆ _Thread_Entry_adaptor_numeric()

void _Thread_Entry_adaptor_numeric ( Thread_Control executing)

Calls the start kinds numeric entry of the thread.

Parameters
executingThe currently executing thread.

◆ _Thread_Entry_adaptor_pointer()

void _Thread_Entry_adaptor_pointer ( Thread_Control executing)

Calls the start kinds pointer entry of the thread.

Stores the return value in the Wait.return_argument of the thread.

Parameters
executingThe currently executing thread.

◆ _Thread_Exit()

RTEMS_NO_RETURN void _Thread_Exit ( void *  exit_value,
Thread_Life_state  life_states_to_set 
)

Exits the currently executing thread.

Parameters
exit_valueis the exit value of the thread.
life_states_to_setare the thread life states to set.

◆ _Thread_Free()

void _Thread_Free ( Thread_Information information,
Thread_Control the_thread 
)

Frees the thread.

This routine invokes the thread delete extensions and frees all resources associated with the thread. Afterwards the thread object is closed.

Parameters
[in,out]informationis the thread information.
[in,out]the_threadis the thread to free.

◆ _Thread_Get()

Thread_Control * _Thread_Get ( Objects_Id  id,
ISR_lock_Context lock_context 
)

Gets a thread by its identifier.

See also
_Objects_Get().
Parameters
idThe id of the thread.
lock_contextThe lock context.

◆ _Thread_Get_CPU_time_used()

Timestamp_Control _Thread_Get_CPU_time_used ( Thread_Control the_thread)

Updates the used cpu time for the heir and dispatches a new heir.

Parameters
[in,out]cpu_selfThe current processor.
[in,out]cpu_for_heirThe processor to do a dispatch on.
heirThe new heir for cpu_for_heir.

Gets the used processor time of the thread throughout its entire lifetime.

Parameters
[in,out]the_threadis the thread.
Returns
Returns the used processor time of the thread throughout its entire lifetime.

◆ _Thread_Get_CPU_time_used_after_last_reset()

Timestamp_Control _Thread_Get_CPU_time_used_after_last_reset ( Thread_Control the_thread)

Gets the used processor time of the thread after the last CPU usage reset.

Parameters
[in,out]the_threadis the thread.
Returns
Returns the used processor time of the thread after the last CPU usage reset.

◆ _Thread_Get_CPU_time_used_locked()

Timestamp_Control _Thread_Get_CPU_time_used_locked ( Thread_Control the_thread)

Gets the used processor time of the thread throughout its entire lifetime if the caller already acquired the thread state and home scheduler locks.

Parameters
[in,out]the_threadis the thread.
Returns
Returns the used processor time of the thread throughout its entire lifetime.

◆ _Thread_Get_name()

size_t _Thread_Get_name ( const Thread_Control the_thread,
char *  buffer,
size_t  buffer_size 
)

Gets the name of the thread.

Parameters
the_threadThe thread to get the name of.
[out]bufferContains the thread's name.
buffer_sizeThe size of buffer.
Returns
The number of bytes copied to buffer.

◆ _Thread_Handler()

void _Thread_Handler ( void  )

Wrapper function for all threads.

This routine is the wrapper function for all threads. It is the starting point for all threads. The user provided thread entry point is invoked by this routine. Operations which must be performed immediately before and after the user's thread executes are found here.

Note
On entry, it is assumed all interrupts are blocked and that this routine needs to set the initial isr level. This may or may not actually be needed by the context switch routine and as a result interrupts may already be at there proper level. Either way, setting the initial isr level properly here is safe.

◆ _Thread_Handler_initialization()

void _Thread_Handler_initialization ( void  )

Initializes thread handler.

This routine performs the initialization necessary for this handler.

◆ _Thread_Initialize()

Status_Control _Thread_Initialize ( Thread_Information information,
Thread_Control the_thread,
const Thread_Configuration config 
)

Initializes thread.

This routine initializes the specified the thread. It allocates all memory associated with this thread. It completes by adding the thread to the local object table so operations on this thread id are allowed.

Note
If stack_area is NULL, it is allocated from the workspace.
If the stack is allocated from the workspace, then it is guaranteed to be of at least minimum size.
Parameters
informationThe thread information.
the_threadThe thread to initialize.
configThe configuration of the thread to initialize.
Return values
STATUS_SUCCESSFULThe thread initialization was successful.
STATUS_UNSATISFIEDThe thread initialization failed.

◆ _Thread_Initialize_information()

void _Thread_Initialize_information ( Thread_Information information)

Initializes the thread information.

Parameters
[out]informationInformation to initialize.

◆ _Thread_Iterate()

void _Thread_Iterate ( Thread_Visitor  visitor,
void *  arg 
)

Calls the visitor with all threads and the given argument until it is done.

Parameters
visitorFunction that gets a thread and arg as parameters and returns if it is done.
argParameter for visitor

◆ _Thread_Join()

Status_Control _Thread_Join ( Thread_Control the_thread,
States_Control  waiting_for_join,
Thread_Control executing,
Thread_queue_Context queue_context 
)

Joins the currently executing thread with the thread.

Parameters
[in,out]the_threadis the thread to join.
waiting_for_joinis the thread state for the currently executing thread.
[in,out]executingis the currently executing thread.
queue_context[in,out]is the thread queue context. The caller shall have acquired the thread state lock using the thread queue context.
Return values
STATUS_SUCCESSFULThe operation was successful.
STATUS_DEADLOCKA deadlock occurred.

◆ _Thread_Kill_zombies()

void _Thread_Kill_zombies ( void  )

Kills all zombie threads in the system.

Threads change into the zombie state as the last step in the thread termination sequence right before a context switch to the heir thread is initiated. Since the thread stack is still in use during this phase we have to postpone the thread stack reclamation until this point. On SMP configurations we may have to busy wait for context switch completion here.

◆ _Thread_Load_environment()

void _Thread_Load_environment ( Thread_Control the_thread)

Initializes enviroment for a thread.

This routine initializes the context of the_thread to its appropriate starting state.

Parameters
[in,out]the_threadThe pointer to the thread control block.

◆ _Thread_Priority_add()

void _Thread_Priority_add ( Thread_Control the_thread,
Priority_Node priority_node,
Thread_queue_Context queue_context 
)

Adds the specified thread priority node to the corresponding thread priority aggregation.

The caller must be the owner of the thread wait lock.

Parameters
the_threadThe thread.
priority_nodeThe thread priority node to add.
queue_contextThe thread queue context to return an updated set of threads for _Thread_Priority_update(). The thread queue context must be initialized via _Thread_queue_Context_clear_priority_updates() before a call of this function.
See also
_Thread_Wait_acquire().

◆ _Thread_Priority_changed()

void _Thread_Priority_changed ( Thread_Control the_thread,
Priority_Node priority_node,
Priority_Group_order  priority_group_order,
Thread_queue_Context queue_context 
)

Propagates a thread priority value change in the specified thread priority node to the corresponding thread priority aggregation.

The caller must be the owner of the thread wait lock.

Parameters
the_threadThe thread.
[out]priority_nodeThe thread priority node to change.
priority_group_orderThe priority group order determines if the thread is inserted as the first or last node into the ready or scheduled queues of its home scheduler, see PRIORITY_GROUP_FIRST and PRIORITY_GROUP_LAST.
queue_contextThe thread queue context to return an updated set of threads for _Thread_Priority_update(). The thread queue context must be initialized via _Thread_queue_Context_clear_priority_updates() before a call of this function.
See also
_Thread_Wait_acquire().

◆ _Thread_Priority_perform_actions()

void _Thread_Priority_perform_actions ( Thread_Control start_of_path,
Thread_queue_Context queue_context 
)

Checks if the thread is owner of the lock of the join queue.

Parameters
the_threadThe thread for the verification.
Return values
trueThe thread is owner of the lock of the join queue.
falseThe thread is not owner of the lock of the join queue.

Performs the priority actions specified by the thread queue context along the thread queue path.

The caller must be the owner of the thread wait lock.

Parameters
start_of_pathThe start thread of the thread queue path.
queue_contextThe thread queue context specifying the thread queue path and initial thread priority actions.
See also
_Thread_queue_Path_acquire_critical().

◆ _Thread_Priority_remove()

void _Thread_Priority_remove ( Thread_Control the_thread,
Priority_Node priority_node,
Thread_queue_Context queue_context 
)

Removes the specified thread priority node from the corresponding thread priority aggregation.

The caller must be the owner of the thread wait lock.

Parameters
the_threadThe thread.
priority_nodeThe thread priority node to remove.
queue_contextThe thread queue context to return an updated set of threads for _Thread_Priority_update(). The thread queue context must be initialized via _Thread_queue_Context_clear_priority_updates() before a call of this function.
See also
_Thread_Wait_acquire().

◆ _Thread_Priority_update()

void _Thread_Priority_update ( Thread_queue_Context queue_context)

Updates the priority of all threads in the set.

Parameters
queue_contextThe thread queue context to return an updated set of threads for _Thread_Priority_update(). The thread queue context must be initialized via _Thread_queue_Context_clear_priority_updates() before a call of this function.
See also
_Thread_Priority_add(), _Thread_Priority_change(), _Thread_Priority_changed() and _Thread_Priority_remove().

◆ _Thread_Restart()

Status_Control _Thread_Restart ( Thread_Control the_thread,
const Thread_Entry_information entry,
ISR_lock_Context lock_context 
)

Restarts the thread.

Parameters
[in,out]the_threadis the thread to restart.
entryis the new start entry information for the thread to restart.
[in,out]lock_contextis the lock context with interrupts disabled.
Return values
STATUS_SUCCESSFULThe operation was successful.
STATUS_INCORRECT_STATEThe thread was dormant.

◆ _Thread_Self_id()

Objects_Id _Thread_Self_id ( void  )

Gets the identifier of the calling thread.

Returns
Returns the identifier of the calling thread.

◆ _Thread_Set_life_protection()

Thread_Life_state _Thread_Set_life_protection ( Thread_Life_state  state)

Set the thread to life protected.

Calls _Thread_Change_life with the given state AND THREAD_LIFE_PROTECTED to set and THREAD_LIFE_PROTECTED to clear.

Parameters
stateThe states to set.
Returns
The previous state the thread was in.

◆ _Thread_Set_name()

Status_Control _Thread_Set_name ( Thread_Control the_thread,
const char *  name 
)

Sets the name of the thread.

Parameters
[out]the_threadThe thread to change the name of.
nameThe new name for the thread.
Return values
STATUS_SUCCESSFULThe operation succeeded.
STATUS_RESULT_TOO_LARGEThe name was too long.

◆ _Thread_Set_state()

States_Control _Thread_Set_state ( Thread_Control the_thread,
States_Control  state 
)

Sets the specified thread state.

In the case the previous state is the ready state, then the thread is blocked by the scheduler.

Parameters
[in,out]the_threadThe thread.
stateThe state to set. It must not be zero.
Returns
The previous state.

◆ _Thread_Set_state_locked()

States_Control _Thread_Set_state_locked ( Thread_Control the_thread,
States_Control  state 
)

Sets the specified thread state without locking the lock context.

In the case the previous state is the ready state, then the thread is blocked by the scheduler.

Parameters
[in,out]the_threadThe thread.
stateThe state to set. It must not be zero.
Returns
The previous state.

◆ _Thread_Start()

Status_Control _Thread_Start ( Thread_Control the_thread,
const Thread_Entry_information entry,
ISR_lock_Context lock_context 
)

Starts the specified thread.

If the thread is not in the dormant state, the routine returns with a value of false and performs no actions except enabling interrupts as indicated by the ISR lock context.

Otherwise, this routine initializes the executable information for the thread and makes it ready to execute. After the call of this routine, the thread competes with all other ready threads for CPU time.

Then the routine enables the local interrupts as indicated by the ISR lock context.

Then the thread start user extensions are called with thread dispatching disabled and interrupts enabled after making the thread ready. Please note that in SMP configurations, the thread switch and begin user extensions may be called in parallel on another processor.

Then thread dispatching is enabled and other threads may execute before the routine returns.

Parameters
[in,out]the_threadis the thread to start.
entryis the thread entry information.
[in,out]isthe ISR lock context which shall be used to disable the local interrupts before the call of this routine.
Return values
STATUS_SUCCESSFULThe thread start was successful.
STATUS_INCORRECT_STATEThe thread was already started.

◆ _Thread_Start_multitasking()

RTEMS_NO_RETURN void _Thread_Start_multitasking ( void  )

Starts thread multitasking.

This routine initiates multitasking. It is invoked only as part of initialization and its invocation is the last act of the non-multitasking part of the system initialization.

◆ _Thread_Timeout()

void _Thread_Timeout ( Watchdog_Control the_watchdog)

General purpose thread wait timeout.

Parameters
the_watchdogThe thread timer watchdog.

◆ _Thread_Wait_get_id()

Objects_Id _Thread_Wait_get_id ( const Thread_Control the_thread)

Returns the object identifier of the object containing the current thread wait queue.

This function may be used for debug and system information purposes. The caller must be the owner of the thread lock.

Parameters
the_threadThe thread.
Return values
0The thread waits on no thread queue currently, the thread wait queue is not contained in an object, or the current thread state provides insufficient information, e.g. the thread is in the middle of a blocking operation.
otherThe object identifier of the object containing the thread wait queue.

◆ _Thread_Yield()

void _Thread_Yield ( Thread_Control executing)

Yields the currently executing thread.

Parameters
[in,out]executingThe thread that performs a yield.

◆ rtems_iterate_over_all_threads()

void rtems_iterate_over_all_threads ( rtems_per_thread_routine  routine)

Deprecated, use rtems_task_iterate() instead.

Use rtems_task_iterate() instead.

Variable Documentation

◆ _Thread_Allocated_fp

Thread_Control* _Thread_Allocated_fp
extern

The following points to the thread whose floating point context is currently loaded.

◆ _Thread_Control_add_on_count

const size_t _Thread_Control_add_on_count
extern

Thread control add-on count.

Count of entries in _Thread_Control_add_ons.

This value is provided via <rtems/confdefs.h>.

◆ _Thread_Control_add_ons

const Thread_Control_add_on _Thread_Control_add_ons[]
extern

Thread control add-ons.

The thread control block contains fields that point to application configuration dependent memory areas, like the scheduler information, the API control blocks, the user extension context table, and the Newlib re-entrancy support. Account for these areas in the configuration and avoid extra workspace allocations for these areas.

This array is provided via <rtems/confdefs.h>.

See also
_Thread_Control_add_on_count.

◆ _Thread_CPU_budget_exhaust_timeslice

const Thread_CPU_budget_operations _Thread_CPU_budget_exhaust_timeslice
extern

These CPU budget operations allocate timeslices to the thread.

The timeslice is not reset at a context switch to the thread. Once a timeslice is consumed, the thread yields.

◆ _Thread_CPU_budget_reset_timeslice

const Thread_CPU_budget_operations _Thread_CPU_budget_reset_timeslice
extern

These CPU budget operations allocate timeslices to the thread.

The timeslice is reset at a context switch to the thread. Once a timeslice is consumed, the thread yields.

◆ _Thread_Global_constructor

Objects_Id _Thread_Global_constructor
extern

Object identifier of the global constructor thread.

This variable is set by _RTEMS_tasks_Initialize_user_tasks_body() or _POSIX_Threads_Initialize_user_threads_body().

It is consumed by _Thread_Handler().

◆ _Thread_Idle_body

const Thread_Idle_body _Thread_Idle_body
extern

The idle thread body.

This constant is defined by the application configuration via <rtems/confdefs.h>.

◆ _Thread_Idle_stack_size

const size_t _Thread_Idle_stack_size
extern

The idle thread stack size in bytes.

This constant is defined by the application configuration via <rtems/confdefs.h>.

◆ _Thread_Initial_thread_count

const size_t _Thread_Initial_thread_count
extern

Count of configured threads.

This value is provided via <rtems/confdefs.h>.

◆ _Thread_Maximum_name_size

const size_t _Thread_Maximum_name_size
extern

Maximum size of a thread name in characters (including the terminating '\0' character).

This value is provided via <rtems/confdefs.h>.

◆ _Thread_Maximum_TLS_size

const size_t _Thread_Maximum_TLS_size
extern

If this constant is greater than zero, then it defines the maximum thread-local storage size, otherwise the thread-local storage size is defined by the linker depending on the thread-local storage objects used by the application in the statically-linked executable.

This value is provided via <rtems/confdefs.h>.

◆ _Thread_Zombies

Thread_Zombie_registry _Thread_Zombies
extern

This object is a registry for threads in the STATES_ZOMBIE state.

The registry contains zombie threads waiting to get killed by _Thread_Kill_zombies(). Use _Thread_Add_to_zombie_registry() to add zombie threads to the registry.