RTEMS 6.3
Loading...
Searching...
No Matches
threadimpl.h File Reference

This header file provides interfaces of the Thread Handler which are only used by the implementation. More...

Go to the source code of this file.

Data Structures

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_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 bool(*) Thread_Visitor(Thread_Control *the_thread, void *arg)

Enumerations

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

Functions

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

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 header file provides interfaces of the Thread Handler which are only used by the implementation.