Barrelfish
Data Fields
thread Class Reference

A thread of execution / thread control block (TCB) More...

+ Collaboration diagram for thread:

Data Fields

struct threadself
 Points to itself.
 
dispatcher_handle_t disp
 Dispatcher affinity.
 
struct tls_dtvtls_dtv
 TLS thread vector.
 
struct threadprev
 Next/prev threads in list.
 
arch_registers_state_t regs
 Register state snapshot.
 
void * stack
 Malloced stack area.
 
void * stack_top
 Stack bounds.
 
void * exception_stack
 Stack for exception handling.
 
void * exception_stack_top
 Bounds of exception stack.
 
exception_handler_fn exception_handler
 Exception handler, or NULL.
 
void * userptr
 User's thread local pointer.
 
void * userptrs [MAX_TLS]
 User's thread local pointers.
 
uintptr_t yield_epoch
 Yield epoch.
 
void * wakeup_reason
 Value returned from block()
 
coreid_t coreid
 XXX: Core ID affinity.
 
int return_value
 Value returned on exit.
 
struct thread_cond exit_condition
 Thread exit condition.
 
struct thread_mutex exit_lock
 Protects exited state.
 
enum thread_state state
 Thread state.
 
bool paused
 Thread is paused (not runnable)
 
bool detached
 true if detached
 
bool joining
 true if someone is joining
 
bool in_exception
 true if running exception handler
 
bool used_fpu
 Ever used FPU?
 
arch_registers_fpu_state_t fpu_state
 FPU state.
 
void * slab
 Base of slab block containing this TCB.
 
uintptr_t id
 User-defined thread identifier.
 
uint32_t token_number
 RPC next token.
 
uint32_t token
 Token to be received.
 
struct waitset_chanstatechannel
 on right channel
 
bool rpc_in_progress
 RPC in progress.
 
errval_t async_error
 RPC async error.
 
uint32_t outgoing_token
 Token of outgoing message.
 
struct capref recv_slots [MAX_RECV_SLOTS]
 Queued cap recv slots.
 
int8_t recv_slot_count
 number of currently queued recv slots
 
struct waitset_chanstatelocal_trigger
 Trigger for a local thread event.
 

Detailed Description

A thread of execution / thread control block (TCB)

NB: on some ABIs (namely x86_{32,64}), the TLS blocks for initially-loaded (i.e. not dlopen()ed) modules precede this structure in memory. Therefore it's not safe to directly malloc() or free() a thread structure.


The documentation for this class was generated from the following files: