L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
thread.h File Reference

Common thread related definitions. More...

#include <l4/sys/types.h>
#include <l4/sys/utcb.h>
#include <l4/sys/ipc.h>
+ Include dependency graph for thread.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  L4_thread_ops {
  L4_THREAD_CONTROL_OP = 0UL , L4_THREAD_EX_REGS_OP = 1UL , L4_THREAD_SWITCH_OP = 2UL , L4_THREAD_STATS_OP = 3UL ,
  L4_THREAD_VCPU_RESUME_OP = 4UL , L4_THREAD_REGISTER_DELETE_IRQ_OP = 5UL , L4_THREAD_MODIFY_SENDER_OP = 6UL , L4_THREAD_VCPU_CONTROL_OP = 7UL ,
  L4_THREAD_VCPU_CONTROL_EXT_OP = L4_THREAD_VCPU_CONTROL_OP | 0x10000 , L4_THREAD_X86_GDT_OP = 0x10UL , L4_THREAD_ARM_TPIDRURO_OP = 0x10UL , L4_THREAD_AMD64_SET_SEGMENT_BASE_OP = 0x12UL ,
  L4_THREAD_AMD64_GET_SEGMENT_INFO_OP = 0x13UL , L4_THREAD_OPCODE_MASK = 0xffff
}
 Operations on thread objects. More...
 
enum  L4_thread_control_flags {
  L4_THREAD_CONTROL_SET_PAGER = 0x0010000 , L4_THREAD_CONTROL_BIND_TASK = 0x0200000 , L4_THREAD_CONTROL_ALIEN = 0x0400000 , L4_THREAD_CONTROL_UX_NATIVE = 0x0800000 ,
  L4_THREAD_CONTROL_SET_EXC_HANDLER = 0x1000000
}
 Flags for the thread control operation. More...
 
enum  L4_thread_control_mr_indices {
  L4_THREAD_CONTROL_MR_IDX_FLAGS = 0 , L4_THREAD_CONTROL_MR_IDX_PAGER = 1 , L4_THREAD_CONTROL_MR_IDX_EXC_HANDLER = 2 , L4_THREAD_CONTROL_MR_IDX_FLAG_VALS = 4 ,
  L4_THREAD_CONTROL_MR_IDX_BIND_UTCB = 5 , L4_THREAD_CONTROL_MR_IDX_BIND_TASK = 6
}
 Indices for the values in the message register for thread control. More...
 
enum  L4_thread_ex_regs_flags { L4_THREAD_EX_REGS_CANCEL = 0x10000UL , L4_THREAD_EX_REGS_TRIGGER_EXCEPTION = 0x20000UL , L4_THREAD_EX_REGS_ARCH_MASK = 0xff000000UL }
 Flags for the thread ex-regs operation. More...
 

Functions

l4_msgtag_t l4_thread_ex_regs (l4_cap_idx_t thread, l4_addr_t ip, l4_addr_t sp, l4_umword_t flags) L4_NOTHROW
 Exchange basic thread registers.
 
l4_msgtag_t l4_thread_ex_regs_u (l4_cap_idx_t thread, l4_addr_t ip, l4_addr_t sp, l4_umword_t flags, l4_utcb_t *utcb) L4_NOTHROW
 Exchange basic thread registers.
 
l4_msgtag_t l4_thread_ex_regs_ret (l4_cap_idx_t thread, l4_addr_t *ip, l4_addr_t *sp, l4_umword_t *flags) L4_NOTHROW
 Exchange basic thread registers and return previous values.
 
l4_msgtag_t l4_thread_ex_regs_ret_u (l4_cap_idx_t thread, l4_addr_t *ip, l4_addr_t *sp, l4_umword_t *flags, l4_utcb_t *utcb) L4_NOTHROW
 Exchange basic thread registers and return previous values.
 
void l4_thread_control_start (void) L4_NOTHROW
 Start a thread control API sequence.
 
void l4_thread_control_pager (l4_cap_idx_t pager) L4_NOTHROW
 Set the pager.
 
void l4_thread_control_exc_handler (l4_cap_idx_t exc_handler) L4_NOTHROW
 Set the exception handler.
 
void l4_thread_control_bind (l4_utcb_t *thread_utcb, l4_cap_idx_t task) L4_NOTHROW
 Bind the thread to a task.
 
void l4_thread_control_alien (int on) L4_NOTHROW
 Enable alien mode.
 
void l4_thread_control_ux_host_syscall (int on) L4_NOTHROW
 Enable pass through of native host (Linux) system calls.
 
l4_msgtag_t l4_thread_control_commit (l4_cap_idx_t thread) L4_NOTHROW
 Commit the thread control parameters.
 
l4_msgtag_t l4_thread_yield (void) L4_NOTHROW
 Yield current time slice.
 
l4_msgtag_t l4_thread_switch (l4_cap_idx_t to_thread) L4_NOTHROW
 Switch to another thread (and donate the remaining time slice).
 
l4_msgtag_t l4_thread_stats_time (l4_cap_idx_t thread, l4_kernel_clock_t *us) L4_NOTHROW
 Get consumed time of thread in µs.
 
l4_msgtag_t l4_thread_vcpu_resume_start (void) L4_NOTHROW
 vCPU return from event handler.
 
l4_msgtag_t l4_thread_vcpu_resume_commit (l4_cap_idx_t thread, l4_msgtag_t tag) L4_NOTHROW
 Commit vCPU resume.
 
l4_msgtag_t l4_thread_vcpu_control (l4_cap_idx_t thread, l4_addr_t vcpu_state) L4_NOTHROW
 Enable the vCPU feature for the thread.
 
l4_msgtag_t l4_thread_vcpu_control_u (l4_cap_idx_t thread, l4_addr_t vcpu_state, l4_utcb_t *utcb) L4_NOTHROW
 Enable the vCPU feature for the thread.
 
l4_msgtag_t l4_thread_vcpu_control_ext (l4_cap_idx_t thread, l4_addr_t ext_vcpu_state) L4_NOTHROW
 Enable the extended vCPU feature for the thread.
 
l4_msgtag_t l4_thread_vcpu_control_ext_u (l4_cap_idx_t thread, l4_addr_t ext_vcpu_state, l4_utcb_t *utcb) L4_NOTHROW
 Enable the extended vCPU feature for the thread.
 
l4_msgtag_t l4_thread_register_del_irq (l4_cap_idx_t thread, l4_cap_idx_t irq) L4_NOTHROW
 Register an IRQ that will trigger upon deletion events.
 
l4_msgtag_t l4_thread_modify_sender_start (void) L4_NOTHROW
 Start a thread sender modification sequence.
 
int l4_thread_modify_sender_add (l4_umword_t match_mask, l4_umword_t match, l4_umword_t del_bits, l4_umword_t add_bits, l4_msgtag_t *tag) L4_NOTHROW
 Add a modification pattern to a sender modification sequence.
 
l4_msgtag_t l4_thread_modify_sender_commit (l4_cap_idx_t thread, l4_msgtag_t tag) L4_NOTHROW
 Apply (commit) a sender modification sequence.
 

Detailed Description

Common thread related definitions.

Definition in file thread.h.