Thread attributes used for control_commit().
More...
Thread attributes used for control_commit().
This class is responsible for initializing various attributes of a thread in a UTCB for the control_commit() method.
- Note
- Instantiation of this class starts the preparation of the UTCB. Do not invoke any non-Attr functions between the instantiation and the call to
L4::Thread::control()
.
- See also
- Thread control for some more details.
Definition at line 129 of file thread.
◆ Attr()
Create a thread-attribute object with the given UTCB.
- Parameters
-
utcb | The UTCB to use for the later L4::Thread::control_commit() function. Usually this is the UTCB of the calling thread. |
Definition at line 142 of file thread.
◆ bind()
void L4::Thread::Attr::bind |
( |
l4_utcb_t * |
thread_utcb, |
|
|
Cap< Task > const & |
task |
|
) |
| |
|
inlinenoexcept |
Bind the thread to a task.
- Parameters
-
thread_utcb | The thread’s UTCB address within the task it shall be bound to. The address must be aligned (architecture dependent; at least word aligned) and it must point to at least L4_UTCB_OFFSET bytes of kernel-user memory. |
task | The task the thread shall be bound to. |
A thread may execute code in the context of a task if and only if the thread is bound to the task. To actually start execution, L4::Thread::ex_regs() needs to be used. Execution in the context of the task means that the code has access to all the task’s resources (and only those). The executed code itself must be one of those resources.
- Note
- The UTCBs of different threads in the same task should not overlap in order to prevent data corruption.
Definition at line 202 of file thread.
◆ exc_handler() [1/2]
Cap<void> L4::Thread::Attr::exc_handler |
( |
| ) |
|
|
inlinenoexcept |
Get the capability selector used for exception messages.
- Returns
- The capability selector used to send exception messages. The selector is valid in the task the thread is bound to.
Definition at line 180 of file thread.
◆ exc_handler() [2/2]
void L4::Thread::Attr::exc_handler |
( |
Cap< void > const & |
exc_handler | ) |
|
|
inlinenoexcept |
Set the exception-handler capability selector.
- Parameters
-
exc_handler | The capability selector that shall be used for exception messages. This capability selector must be valid within the task the thread is bound to. |
Definition at line 171 of file thread.
◆ pager() [1/2]
Cap<void> L4::Thread::Attr::pager |
( |
| ) |
|
|
inlinenoexcept |
Get the capability selector used for page-fault messages.
- Returns
- The capability selector used to send page-fault messages. The selector is valid in the task the thread is bound to.
Definition at line 161 of file thread.
◆ pager() [2/2]
void L4::Thread::Attr::pager |
( |
Cap< void > const & |
pager | ) |
|
|
inlinenoexcept |
Set the pager capability selector.
- Parameters
-
pager | The capability selector that shall be used for page-fault messages. This capability selector must be valid within the task the thread is bound to. |
Definition at line 152 of file thread.
◆ ux_host_syscall()
void L4::Thread::Attr::ux_host_syscall |
( |
int |
on | ) |
|
|
inlinenoexcept |
Allow host system calls on Fiasco-UX.
- Precondition
- Running on Fiasco-UX.
Definition at line 216 of file thread.
The documentation for this class was generated from the following file: