C Microkernel Realtime eXecutive
Realtime Operating System for Cortex-M based microcontrollers
 
Loading...
Searching...
No Matches
OS_thread_t Struct Reference

Thread control block. More...

Data Fields

uint32_t * sp
 Value of SP.
 
const void * wait_object
 Identification of object, which causes this thread to block.
 
WaitHandler_twait_callback
 
void(* signal_handler )(int)
 Address of signal handler to use.
 
uint32_t signals
 Current pending signal bitmask.
 
struct Arch_State_t arch
 
int exit_status
 Exit status after thread quit.
 
OS_RPC_stack rpc_stack
 Ummmmm...
 
uint8_t stack_id
 ID of stack, which is allocated to this thread.
 
enum ThreadState state
 State of this thread.
 
uint8_t priority
 Thread priority.
 
Process_t process_id
 Owning process reference.
 
uint8_t core_id
 Core at which this thread is running.
 
uint8_t base_priority
 Configured priority.
 

Detailed Description

Thread control block.

This structure holds current status of the thread.

Field Documentation

◆ arch

struct Arch_State_t OS_thread_t::arch

◆ base_priority

uint8_t OS_thread_t::base_priority

Configured priority.

This is base priority configured by the thread. This is the lowest priority at which the thread will run. It may run at higher priority due to priority inversion resolve or another mechanism.

◆ core_id

uint8_t OS_thread_t::core_id

Core at which this thread is running.

◆ exit_status

int OS_thread_t::exit_status

Exit status after thread quit.

◆ priority

uint8_t OS_thread_t::priority

Thread priority.

This is used by scheduler to decide which thread to run.

◆ process_id

Process_t OS_thread_t::process_id

Owning process reference.

◆ rpc_stack

OS_RPC_stack OS_thread_t::rpc_stack

Ummmmm...

◆ signal_handler

void(* OS_thread_t::signal_handler) (int)

Address of signal handler to use.

◆ signals

uint32_t OS_thread_t::signals

Current pending signal bitmask.

Each set bit means that one signal has been delivered.

◆ sp

uint32_t* OS_thread_t::sp

Value of SP.

This is only valid if thread is in state different than THREAD_STATE_RUNNING. Obviously it is undefined for empty thread slots and slots which don't have stack allocated yet.

◆ stack_id

uint8_t OS_thread_t::stack_id

ID of stack, which is allocated to this thread.

◆ state

enum ThreadState OS_thread_t::state

State of this thread.

◆ wait_callback

WaitHandler_t* OS_thread_t::wait_callback

◆ wait_object

const void* OS_thread_t::wait_object

Identification of object, which causes this thread to block.

This value if context-dependent. If thread is blocked joining other thread, then this contains thread ID. If thread is blocked waiting for mutex, then this contains mutex address.