28#include <l4/sys/utcb.h>
29#include <l4/sys/ipc.h>
242l4_thread_control_exc_handler_u(
l4_cap_idx_t exc_handler,
276l4_thread_control_bind_u(
l4_utcb_t *thread_utcb,
656l4_thread_modify_sender_add_u(
l4_umword_t match_mask,
770#include <l4/sys/ipc.h>
790 if (l4_error_u(ret, utcb))
815l4_thread_control_exc_handler_u(
l4_cap_idx_t exc_handler,
928 l4_thread_control_start_u(
l4_utcb());
934 l4_thread_control_pager_u(pager,
l4_utcb());
940 l4_thread_control_exc_handler_u(exc_handler,
l4_utcb());
947 l4_thread_control_bind_u(thread_utcb, task,
l4_utcb());
953 l4_thread_control_alien_u(
l4_utcb(), on);
959 l4_thread_control_ux_host_syscall_u(
l4_utcb(), on);
965 return l4_thread_control_commit_u(thread,
l4_utcb());
974 return l4_thread_switch_u(to_thread,
l4_utcb());
983 return l4_thread_stats_time_u(thread, us,
l4_utcb());
989 return l4_thread_vcpu_resume_start_u(
l4_utcb());
996 return l4_thread_vcpu_resume_commit_u(thread, tag,
l4_utcb());
1015 return l4_thread_register_del_irq_u(thread, irq,
l4_utcb());
1025 v->
mr[1] = vcpu_state;
1039 v->
mr[0] = L4_THREAD_VCPU_CONTROL_EXT_OP;
1040 v->
mr[1] = ext_vcpu_state;
1057l4_thread_modify_sender_add_u(
l4_umword_t match_mask,
1065 if (w >= L4_UTCB_GENERIC_DATA_SIZE - 4)
1068 m->
mr[w] = match_mask;
1070 m->
mr[w+2] = del_bits;
1071 m->
mr[w+3] = add_bits;
1088 return l4_thread_modify_sender_start_u(
l4_utcb());
1098 return l4_thread_modify_sender_add_u(match_mask, match,
1099 del_bits, add_bits, tag,
l4_utcb());
1105 return l4_thread_modify_sender_commit_u(thread, tag,
l4_utcb());
unsigned long l4_umword_t
Unsigned machine word.
unsigned long l4_addr_t
Address type.
l4_uint64_t l4_kernel_clock_t
Kernel clock type.
unsigned long l4_cap_idx_t
Capability selector type.
@ L4_INVALID_CAP
Invalid capability selector.
l4_fpage_t l4_obj_fpage(l4_cap_idx_t obj, unsigned int order, unsigned char rights) L4_NOTHROW
Create a kernel-object flex page.
@ L4_CAP_FPAGE_RWS
Read, interface specific 'W', and 'S' rights for capability flex-pages.
l4_msgtag_t l4_ipc_receive(l4_cap_idx_t object, l4_utcb_t *utcb, l4_timeout_t timeout) L4_NOTHROW
Wait for a message from a specific source.
l4_msgtag_t l4_ipc_call(l4_cap_idx_t object, l4_utcb_t *utcb, l4_msgtag_t tag, l4_timeout_t timeout) L4_NOTHROW
Object call (usual invocation).
l4_umword_t l4_map_obj_control(l4_umword_t spot, unsigned grant) L4_NOTHROW
Create the first word for a map item for the object space.
@ L4_ITEM_MAP
Identify a message item as map item.
unsigned l4_msgtag_has_error(l4_msgtag_t t) L4_NOTHROW
Test for error indicator flag.
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
unsigned l4_msgtag_words(l4_msgtag_t t) L4_NOTHROW
Get the number of untyped words.
long l4_msgtag_label(l4_msgtag_t t) L4_NOTHROW
Get the protocol of tag.
@ L4_PROTO_THREAD
Protocol for messages to a thread object.
L4_thread_ops
Operations on thread objects.
@ L4_THREAD_OPCODE_MASK
Mask for opcodes.
@ L4_THREAD_AMD64_GET_SEGMENT_INFO_OP
Get segment information.
@ L4_THREAD_AMD64_SET_SEGMENT_BASE_OP
Set segment base.
@ L4_THREAD_X86_GDT_OP
Gdt.
@ L4_THREAD_EX_REGS_OP
Exchange registers operation.
@ L4_THREAD_STATS_OP
Thread statistics.
@ L4_THREAD_VCPU_CONTROL_OP
Enable / disable VCPU feature.
@ L4_THREAD_MODIFY_SENDER_OP
Modify all senders IDs that match the given pattern.
@ L4_THREAD_CONTROL_OP
Control operation.
@ L4_THREAD_ARM_TPIDRURO_OP
Set TPIDRURO register.
@ L4_THREAD_VCPU_RESUME_OP
VCPU resume.
@ L4_THREAD_REGISTER_DELETE_IRQ_OP
Register an IPC-gate deletion IRQ.
@ L4_THREAD_SWITCH_OP
Do a thread switch.
l4_msgtag_t l4_thread_modify_sender_start(void) L4_NOTHROW
Start a thread sender modification sequence.
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_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_thread_ex_regs_flags
Flags for the thread ex-regs operation.
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_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_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.
l4_msgtag_t l4_thread_yield(void) L4_NOTHROW
Yield current time slice.
l4_msgtag_t l4_thread_vcpu_resume_start(void) L4_NOTHROW
vCPU return from event handler.
L4_thread_control_flags
Flags for the thread control operation.
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_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_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_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_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_vcpu_resume_commit(l4_cap_idx_t thread, l4_msgtag_t tag) L4_NOTHROW
Commit vCPU resume.
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.
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_vcpu_control(l4_cap_idx_t thread, l4_addr_t vcpu_state) L4_NOTHROW
Enable the vCPU feature for the thread.
L4_thread_control_mr_indices
Indices for the values in the message register for thread control.
@ L4_THREAD_EX_REGS_CANCEL
Cancel ongoing IPC in the thread.
@ L4_THREAD_EX_REGS_ARCH_MASK
Arch specific flags.
@ L4_THREAD_EX_REGS_TRIGGER_EXCEPTION
Trigger artificial exception in thread.
@ L4_THREAD_CONTROL_SET_PAGER
The pager will be given.
@ L4_THREAD_CONTROL_BIND_TASK
The task to bind the thread to will be given.
@ L4_THREAD_CONTROL_UX_NATIVE
Fiasco-UX only: pass-through of host system calls is set.
@ L4_THREAD_CONTROL_ALIEN
Alien state of the thread is set.
@ L4_THREAD_CONTROL_SET_EXC_HANDLER
The exception handler of the thread will be given.
@ L4_THREAD_CONTROL_MR_IDX_FLAG_VALS
Index for feature values.
@ L4_THREAD_CONTROL_MR_IDX_PAGER
Index for pager cap.
@ L4_THREAD_CONTROL_MR_IDX_BIND_TASK
Index for task flex-page for bind.
@ L4_THREAD_CONTROL_MR_IDX_EXC_HANDLER
Index for exception handler.
@ L4_THREAD_CONTROL_MR_IDX_FLAGS
@ L4_THREAD_CONTROL_MR_IDX_BIND_UTCB
Index for UTCB address for bind.
void l4_thread_control_bind(l4_utcb_t *thread_utcb, l4_cap_idx_t task) L4_NOTHROW
Bind the thread to a task.
l4_msgtag_t l4_thread_control_commit(l4_cap_idx_t thread) L4_NOTHROW
Commit the thread control parameters.
void l4_thread_control_alien(int on) L4_NOTHROW
Enable alien mode.
void l4_thread_control_exc_handler(l4_cap_idx_t exc_handler) L4_NOTHROW
Set the exception handler.
void l4_thread_control_start(void) L4_NOTHROW
Start a thread control API sequence.
void l4_thread_control_ux_host_syscall(int on) L4_NOTHROW
Enable pass through of native host (Linux) system calls.
void l4_thread_control_pager(l4_cap_idx_t pager) L4_NOTHROW
Set the pager.
unsigned l4_utcb_mr64_idx(unsigned idx) L4_NOTHROW
Get index into 64bit message registers alias from native-sized index.
#define L4_IPC_BOTH_TIMEOUT_0
0 receive and send timeout
#define L4_IPC_NEVER
never timeout
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
#define L4_INLINE
L4 Inline function attribute.
Common L4 ABI Data Types.
Message tag data structure.
l4_umword_t raw
Raw value.
Encapsulation of the message-register block in the UTCB.
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.
l4_uint64_t mr64[L4_UTCB_GENERIC_DATA_SIZE/(sizeof(l4_uint64_t)/sizeof(l4_umword_t))]
Message registers 64bit alias.