API for Thread Control method.
More...
API for Thread Control method.
The thread control API provides access to almost any parameter of a thread object. The API is based on a single invocation of the thread object. However, because of the huge amount of parameters, the API provides a set of functions to set specific parameters of a thread and a commit function to commit the thread control call (see l4_thread_control_commit()).
A thread control operation must always start with l4_thread_control_start() and be committed with l4_thread_control_commit(). All other thread control parameter setter functions must be called between these two functions.
An example for a sequence of thread control API calls can be found below.
l4_utcb_t *u = l4_utcb();
l4_thread_control_start(u);
l4_thread_control_pager(u, pager_cap);
l4_thread_control_bind (u, thread_utcb, task);
l4_thread_control_commit(u, thread_cap);
◆ l4_thread_control_alien()
void l4_thread_control_alien |
( |
int |
on | ) |
|
|
inline |
Enable alien mode.
- Parameters
-
on | Boolean value defining the state of the feature. |
Alien mode means the thread is not allowed to invoke L4 kernel objects directly and it is also not allowed to allocate FPU state. All those operations result in an exception IPC that gets sent through the pager capability. The responsible pager can then selectively allow an object invocation or allocate FPU state for the thread.
This feature can be used to attach a debugger to a thread and trace all object invocations.
- Examples:
- examples/sys/aliens/main.c, and examples/sys/singlestep/main.c.
Definition at line 868 of file thread.h.
◆ l4_thread_control_bind()
◆ l4_thread_control_commit()
◆ l4_thread_control_exc_handler()
void l4_thread_control_exc_handler |
( |
l4_cap_idx_t |
exc_handler | ) |
|
|
inline |
◆ l4_thread_control_pager()
◆ l4_thread_control_start()
void l4_thread_control_start |
( |
void |
| ) |
|
|
inline |
◆ l4_thread_control_ux_host_syscall()
void l4_thread_control_ux_host_syscall |
( |
int |
on | ) |
|
|
inline |
Enable pass through of native host (Linux) system calls.
- Parameters
-
on | Boolean value defining the state of the feature. |
- Precondition
- Running on Fiasco-UX
This enables the thread to do host system calls. This feature is only available in Fiasco-UX and ignored in other environments.
Definition at line 874 of file thread.h.