28 #include <l4/sys/thread.h>
59 public Kobject_t<Thread, Kobject, L4_PROTO_THREAD,
60 Type_info::Demand_t<1> >
143 { l4_thread_control_start_u(utcb); }
153 { l4_thread_control_pager_u(
pager.cap(), _u); }
162 {
return Cap<void>(l4_utcb_mr_u(_u)->mr[1]); }
172 { l4_thread_control_exc_handler_u(
exc_handler.cap(), _u); }
181 {
return Cap<void>(l4_utcb_mr_u(_u)->mr[2]); }
203 { l4_thread_control_bind_u(thread_utcb, task.cap(), _u); }
209 { l4_thread_control_alien_u(_u, on); }
217 { l4_thread_control_ux_host_syscall_u(_u, on); }
227 {
return l4_thread_control_commit_u(
cap(), attr._u); }
237 {
return l4_thread_switch_u(
cap(), utcb); }
249 {
return l4_thread_stats_time_u(
cap(), us, utcb); }
257 {
return l4_thread_vcpu_resume_start_u(utcb); }
266 {
return l4_thread_vcpu_resume_commit_u(
cap(), tag, utcb); }
325 {
return l4_thread_register_del_irq_u(
cap(), irq.
cap(), u); }
373 m->
mr[cnt++] = match_mask;
374 m->
mr[cnt++] = match;
375 m->
mr[cnt++] = del_bits;
376 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_commit().
Cap< void > exc_handler() noexcept
Get the capability selector used for exception messages.
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 > pager() noexcept
Get the capability selector used for page-fault messages.
void bind(l4_utcb_t *thread_utcb, Cap< Task > const &task) noexcept
Bind the thread to a task.
void alien(int on) noexcept
Set the thread to alien mode.
Wrapper class for modifying senders.
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.
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
vCPU resume, 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 or disable 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 or disable the extended vCPU feature for the thread.
l4_msgtag_t vcpu_resume_start(l4_utcb_t *utcb=l4_utcb()) noexcept
vCPU resume, 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 or disable 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 or disable 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_UTCB_GENERIC_DATA_SIZE
Total number of message register (MRs) available.
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.