28#include <l4/sys/thread.h>
60 public Kobject_t<Thread, Kobject, L4_PROTO_THREAD,
61 Type_info::Demand_t<1> >
156 { l4_thread_control_start_u(utcb); }
166 { l4_thread_control_pager_u(
pager.cap(), _u); }
175 {
return Cap<void>(l4_utcb_mr_u(_u)->mr[1]); }
185 { l4_thread_control_exc_handler_u(
exc_handler.cap(), _u); }
194 {
return Cap<void>(l4_utcb_mr_u(_u)->mr[2]); }
218 { l4_thread_control_bind_u(thread_utcb, task.cap(), _u); }
224 { l4_thread_control_alien_u(_u, on); }
232 { l4_thread_control_ux_host_syscall_u(_u, on); }
250 {
return l4_thread_control_commit_u(
cap(), attr._u); }
260 {
return l4_thread_switch_u(
cap(), utcb); }
272 {
return l4_thread_stats_time_u(
cap(), us, utcb); }
290 {
return l4_thread_vcpu_resume_start_u(utcb); }
332 {
return l4_thread_vcpu_resume_commit_u(
cap(), tag, utcb); }
415 {
return l4_thread_register_del_irq_u(
cap(), irq.
cap(), u); }
472 if (cnt >= L4_UTCB_GENERIC_DATA_SIZE - 4)
474 m->
mr[cnt++] = match_mask;
475 m->
mr[cnt++] = match;
476 m->
mr[cnt++] = del_bits;
477 m->
mr[cnt++] = add_bits;
L4::Cap related definitions.
l4_cap_idx_t cap() const noexcept
Return capability selector.
C++ interface for capabilities.
Helper class to create an L4Re interface class that is derived from a single base class.
l4_cap_idx_t cap() const noexcept
Return capability selector.
Thread attributes used for control().
void pager(Cap< void > const &pager) noexcept
Set the pager capability selector.
void exc_handler(Cap< void > const &exc_handler) noexcept
Set the exception-handler capability selector.
Attr(l4_utcb_t *utcb=l4_utcb()) noexcept
Create a thread-attribute object with the given UTCB.
void ux_host_syscall(int on) noexcept
Allow host system calls on Fiasco-UX.
Cap< void > exc_handler() noexcept
Get the capability selector used for exception messages.
void bind(l4_utcb_t *thread_utcb, Cap< Task > const &task) noexcept
Bind the thread to a task.
Cap< void > pager() noexcept
Get the capability selector used for page-fault messages.
void alien(int on) noexcept
Enable alien mode.
Class wrapping a list of rules which modify the sender label of IPC messages inbound to this thread.
int add(l4_umword_t match_mask, l4_umword_t match, l4_umword_t del_bits, l4_umword_t add_bits) noexcept
Add a rule.
C++ L4 kernel thread interface, see Thread for the C interface.
l4_msgtag_t control(Attr const &attr) noexcept
Commit the given thread-attributes object.
l4_msgtag_t register_del_irq(Cap< Irq > irq, l4_utcb_t *u=l4_utcb()) noexcept
Register an IRQ that will trigger upon deletion events.
l4_msgtag_t vcpu_resume_commit(l4_msgtag_t tag, l4_utcb_t *utcb=l4_utcb()) noexcept
Resume from vCPU asynchronous IPC handler, commit.
l4_msgtag_t switch_to(l4_utcb_t *utcb=l4_utcb()) noexcept
Switch execution to this thread.
l4_msgtag_t stats_time(l4_kernel_clock_t *us, l4_utcb_t *utcb=l4_utcb()) noexcept
Get consumed time of thread in us.
l4_msgtag_t vcpu_control(l4_addr_t vcpu_state, l4_utcb_t *utcb=l4_utcb()) noexcept
Enable the vCPU feature for the thread.
l4_msgtag_t modify_senders(Modify_senders const &todo) noexcept
Apply sender modification rules.
l4_msgtag_t ex_regs(l4_addr_t ip, l4_addr_t sp, l4_umword_t flags, l4_utcb_t *utcb=l4_utcb()) noexcept
Exchange basic thread registers.
l4_msgtag_t vcpu_control_ext(l4_addr_t ext_vcpu_state, l4_utcb_t *utcb=l4_utcb()) noexcept
Enable the extended vCPU feature for the thread.
l4_msgtag_t vcpu_resume_start(l4_utcb_t *utcb=l4_utcb()) noexcept
Resume from vCPU asynchronous IPC handler, start.
l4_msgtag_t ex_regs(l4_addr_t *ip, l4_addr_t *sp, l4_umword_t *flags, l4_utcb_t *utcb=l4_utcb()) noexcept
Exchange basic thread registers and return previous values.
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.
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_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
@ L4_PROTO_THREAD
Protocol for messages to a thread object.
@ L4_THREAD_MODIFY_SENDER_OP
Modify all senders IDs that match the given pattern.
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_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_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.
#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.
L4 low-level kernel interface.
Message tag data structure.
Encapsulation of the message-register block in the UTCB.
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.