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

unsigned long * sp
 Value of SP.
 
uint8_t stack_id
 ID of stack, which is allocated to this thread.
 
enum ThreadState state
 State of this thread.
 
unsigned long block_object
 Identification of object, which causes this thread to block.
 
OS_RPC_stack rpc_stack
 Ummmmm...
 
uint8_t priority
 Thread priority.
 
void(* signal_handler )(int)
 Address of signal handler to use.
 
uint32_t signals
 Current pending signal bitmask.
 
int exit_status
 Exit status after thread quit.
 
Process_t process_id
 Owning process reference.
 

Detailed Description

Thread control block.

This structure holds current status of the thread.

Field Documentation

◆ block_object

unsigned long OS_thread_t::block_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.

◆ 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

unsigned long* 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.