Defines | |
| #define | L4_FP_REMAP_PAGE |
| Set page to read only. | |
| #define | L4_FP_FLUSH_PAGE |
| Flush page completely. | |
| #define | L4_FP_OTHER_SPACES |
| Flush page in all other address spaces. | |
| #define | L4_FP_ALL_SPACES |
| Flush page in own address space too. | |
| #define | L4_NC_SAME_CLAN |
| Destination resides within the same clan. | |
| #define | L4_NC_INNER_CLAN |
| Destination is in an inner clan. | |
| #define | L4_NC_OUTER_CLAN |
| Destination is outside the invoker's clan. | |
Enumerations | |
| enum | { L4_TASK_NEW_RAISE_EXCEPTION = 1UL << 30, L4_TASK_NEW_ALIEN = 1UL << 31 } |
| Flags for l4_task_new. More... | |
| enum | { L4_THREAD_EX_REGS_RAISE_EXCEPTION = 1UL << 28, L4_THREAD_EX_REGS_ALIEN = 1UL << 29, L4_THREAD_EX_REGS_NO_CANCEL = 1UL << 30, L4_THREAD_EX_REGS_TASK_ID_SHIFT = 7 } |
Functions | |
| l4_umword_t | l4_fpage_unmap_taskid (unsigned taskid) |
| Unmap task parameter. | |
| void | l4_fpage_unmap (l4_fpage_t fpage, l4_umword_t map_mask) |
| Unmap flexpage. | |
| l4_threadid_t | l4_myself (void) |
| Get the id of the current thread. | |
| l4_threadid_t | l4_myself_noprof (void) |
| Get the id of the current thread, non-profile version. | |
| int | l4_nchief (l4_threadid_t destination, l4_threadid_t *next_chief) |
| Get the thread id of the nearest partner of the invoker. | |
| void | l4_thread_ex_regs (l4_threadid_t destination, l4_umword_t eip, l4_umword_t esp, l4_threadid_t *preempter, l4_threadid_t *pager, l4_umword_t *old_eflags, l4_umword_t *old_eip, l4_umword_t *old_esp) |
| Read and write register values of a thread, create a thread. | |
| void | l4_thread_ex_regs_flags (l4_threadid_t destination, l4_umword_t eip, l4_umword_t esp, l4_threadid_t *preempter, l4_threadid_t *pager, l4_umword_t *old_eflags, l4_umword_t *old_eip, l4_umword_t *old_esp, unsigned long flags) |
| Version of l4_thread_ex_regs() that supports additional flags. | |
| void | l4_inter_task_ex_regs (l4_threadid_t destination, l4_umword_t eip, l4_umword_t esp, l4_threadid_t *preempter, l4_threadid_t *pager, l4_threadid_t *cap_handler, l4_umword_t *old_eflags, l4_umword_t *old_eip, l4_umword_t *old_esp, unsigned long flags, l4_utcb_t *utcb) |
| Version of l4_thread_ex_regs() working over task boundaries. | |
| void | l4_thread_switch (l4_threadid_t destination) |
| Release the processor non-preemptively. | |
| void | l4_yield (void) |
| Release the processor non-preemptively, switch to any thread which is ready to run. | |
| l4_cpu_time_t | l4_thread_schedule (l4_threadid_t dest, l4_sched_param_t param, l4_threadid_t *ext_preempter, l4_threadid_t *partner, l4_sched_param_t *old_param) |
| Define priority, timeslice length and external preempter of other threads. | |
| l4_taskid_t | l4_task_new (l4_taskid_t destination, l4_umword_t mcp_or_new_chief_and_flags, l4_umword_t esp, l4_umword_t eip, l4_threadid_t pager) |
| Create or delete a task. | |
| l4_taskid_t | l4_task_new_long (l4_taskid_t destination, l4_umword_t mcp_or_new_chief_and_flags, l4_umword_t esp, l4_umword_t eip, l4_threadid_t pager, l4_threadid_t cap_handler, l4_quota_desc_t kquota, l4_utcb_t *utcb) |
| Create or delete a task, extended version. | |
| void * | l4_kernel_interface (void) |
| Return pointer to Kernel Interface Page. | |
| int | l4_privctrl (l4_umword_t cmd, l4_umword_t param) |
| Privctrl system call. | |
| void | l4_thread_ex_regs_sc (l4_umword_t val0, l4_umword_t ip, l4_umword_t sp, l4_threadid_t *preempter, l4_threadid_t *pager, l4_umword_t *old_eflags, l4_umword_t *old_eip, l4_umword_t *old_esp) |
| Pure l4_thread_ex_regs syscall version. | |
| l4_taskid_t | l4_task_new_sc (l4_taskid_t destination, l4_umword_t mcp_or_new_chief_and_flags, l4_umword_t sp, l4_umword_t ip, l4_threadid_t pager) |
| Pure l4_task_new syscall version. | |
| anonymous enum |
Flags for l4_task_new.
| L4_TASK_NEW_RAISE_EXCEPTION | Raise exception upon start of thread 0. |
| L4_TASK_NEW_ALIEN | Start thread 0 in alien mode. |
Definition at line 17 of file syscalls_gen.h.
| anonymous enum |
Definition at line 40 of file syscalls_gen.h.
| l4_umword_t l4_fpage_unmap_taskid | ( | unsigned | taskid | ) | [inline] |
Unmap task parameter.
| taskid | Task ID of the task. |
Definition at line 137 of file syscalls-impl.h.
| void l4_fpage_unmap | ( | l4_fpage_t | fpage, | |
| l4_umword_t | map_mask | |||
| ) | [inline] |
Unmap flexpage.
| fpage | Flexpage descriptor | |
| map_mask | Unmap mask (unmap type and unmap location can be combined)
|
| l4_threadid_t l4_myself | ( | void | ) | [inline] |
Get the id of the current thread.
Referenced by l4_myself_noprof().
| l4_threadid_t l4_myself_noprof | ( | void | ) | [inline] |
Get the id of the current thread, non-profile version.
Definition at line 149 of file syscalls-impl.h.
References l4_myself().
| int l4_nchief | ( | l4_threadid_t | destination, | |
| l4_threadid_t * | next_chief | |||
| ) | [inline] |
Get the thread id of the nearest partner of the invoker.
| destination | Destination thread id |
| next_chief | Thread id of the nearest partner, depending on return value. |
| void l4_thread_ex_regs | ( | l4_threadid_t | destination, | |
| l4_umword_t | eip, | |||
| l4_umword_t | esp, | |||
| l4_threadid_t * | preempter, | |||
| l4_threadid_t * | pager, | |||
| l4_umword_t * | old_eflags, | |||
| l4_umword_t * | old_eip, | |||
| l4_umword_t * | old_esp | |||
| ) | [inline] |
Read and write register values of a thread, create a thread.
| destination | Destination thread id | |
| eip | The new instruction pointer of the thread. It must point into the user-accessible part of the address space. The existing instruction pointer is not modified if ~0UL is given. | |
| esp | The new stack pointer for the thread. It must point into the user-accessible part of the address space. The existing stack pointer is not modified if ~0UL is given. | |
| preempter | Defines the internal preempter used by the thread. The current preempter id is not modified if L4_INVALID_ID is given. | |
| pager | Defines the pager used by the thread. the current pager id is not modified if L4_INVALID_ID is given. |
| preempter | Id of the old preempter of the destination thread. | |
| pager | Id of the old pager of the destination thread. | |
| old_eflags | Old flags of the destination thread. | |
| old_eip | Old instruction pointer of the destination thread. | |
| old_esp | Old stack pointer of the destination thread. |
Definition at line 27 of file syscalls-impl.h.
References l4_threadid_t::id, l4_thread_ex_regs_sc(), and l4_threadid_struct_t::lthread.
| void l4_thread_ex_regs_flags | ( | l4_threadid_t | destination, | |
| l4_umword_t | eip, | |||
| l4_umword_t | esp, | |||
| l4_threadid_t * | preempter, | |||
| l4_threadid_t * | pager, | |||
| l4_umword_t * | old_eflags, | |||
| l4_umword_t * | old_eip, | |||
| l4_umword_t * | old_esp, | |||
| unsigned long | flags | |||
| ) | [inline] |
Version of l4_thread_ex_regs() that supports additional flags.
This version of l4_thread_ex_regs() supports additional flags that will not interrupt ongoing IPC (L4_THREAD_EX_REGS_NO_CANCEL), i.e. the effect of l4_thread_ex_regs() will be deferred until the IPC has finished. Note, that if the corresponding IPC is an exception reply, the reply overwrites the values set by l4_thread_ex_regs(). The second flag sets the alien bit (L4_THREAD_EX_REGS_ALIEN), i.e. the thread will trigger exceptions whenever it executes a system call.
Definition at line 45 of file syscalls-impl.h.
References l4_threadid_t::id, l4_thread_ex_regs_sc(), and l4_threadid_struct_t::lthread.
Referenced by l4_thread_ex_regs_pager().
| void l4_inter_task_ex_regs | ( | l4_threadid_t | destination, | |
| l4_umword_t | eip, | |||
| l4_umword_t | esp, | |||
| l4_threadid_t * | preempter, | |||
| l4_threadid_t * | pager, | |||
| l4_threadid_t * | cap_handler, | |||
| l4_umword_t * | old_eflags, | |||
| l4_umword_t * | old_eip, | |||
| l4_umword_t * | old_esp, | |||
| unsigned long | flags, | |||
| l4_utcb_t * | utcb | |||
| ) | [inline] |
Version of l4_thread_ex_regs() working over task boundaries.
| destination | See l4_thread_ex_regs, additionally the task id in the destination is also considered. | |
| eip | See l4_thread_ex_regs | |
| esp | See l4_thread_ex_regs | |
| preempter | See l4_thread_ex_regs | |
| pager | See l4_thread_ex_regs | |
| cap_handler | The new capability handler of the thread. The capability handler is not modified if L4_INVALID_ID is given. | |
| flags | Flags, see l4_thread_ex_regs_flags_options | |
| utcb | UTCB pointer of the caller. |
| preempter | See l4_thread_ex_regs | |
| pager | See l4_thread_ex_regs | |
| cap_handler | The old ID of the capability handler of the thread. | |
| old_eflags | See l4_thread_ex_regs | |
| old_eip | See l4_thread_ex_regs | |
| old_esp | See l4_thread_ex_regs |
Definition at line 64 of file syscalls-impl.h.
References l4_utcb_ex_regs_args::caphandler, l4_utcb_t::ex_regs, l4_threadid_t::id, l4_thread_ex_regs_sc(), L4_THREAD_EX_REGS_UTCB_ARGS, l4_threadid_struct_t::lthread, and l4_threadid_struct_t::task.
| void l4_thread_switch | ( | l4_threadid_t | destination | ) | [inline] |
Release the processor non-preemptively.
| destination | The id of the destination thread the processor should switch to:
|
Referenced by l4_yield().
| l4_cpu_time_t l4_thread_schedule | ( | l4_threadid_t | dest, | |
| l4_sched_param_t | param, | |||
| l4_threadid_t * | ext_preempter, | |||
| l4_threadid_t * | partner, | |||
| l4_sched_param_t * | old_param | |||
| ) | [inline] |
Define priority, timeslice length and external preempter of other threads.
| dest | The identifier of the destination thread. The destination thread must currently exist and run on a priority level less than or equal to the current thread's mcp (maximum controlled priority). | |
| param | Scheduling parameters, see l4_sched_param_t / l4_sched_param_struct_t. If L4_INVALID_SCHED_PARAM, is given, the thread's current scheduling parameters are not modified. | |
| ext_preempter | The id of the external preempter for the thread. If L4_INVALID_ID is given, the current external preempter of the thread is not changed. |
| ext_preempter | Old external preempter of the destination thread. | |
| partner | Id of a partner of an active user-invoked IPC operation. This parameter is only valid, if the thread's user state is sending, receiving, pending or waiting. L4_INVALID_ID is delivered if there is no specific partner, i.e. if the thread is in an open receive state. | |
| old_param | Old scheduling parameter (see l4_sched_param_t / l4_sched_param_struct_t). If L4_INVALID_SCHED_PARAM the addressed thread either does not exist or has priority which exceeds the current thread's mcp (maximum controlled priority). |
The system call is only effective, if the current priority of the specified destination is less than or equal to the current task's maximum controlled priority (mcp).
| l4_taskid_t l4_task_new | ( | l4_taskid_t | destination, | |
| l4_umword_t | mcp_or_new_chief_and_flags, | |||
| l4_umword_t | esp, | |||
| l4_umword_t | eip, | |||
| l4_threadid_t | pager | |||
| ) | [inline] |
Create or delete a task.
| destination | Task id of an existing task whose chief is the current task. If this is not fulfilled, the system call has no effect. Simultaneously, a new task with the same task number is created. It may be active or inactive. | |
| mcp_or_new_chief_and_flags | Depending on the state of the task (active or inactive), two variants are possible here:
| |
| esp | Initial stack pointer for lthread 0 if the new task is created as an active one. Ignore otherwise. | |
| eip | Initial instruction pointer for lthread 0 if the new task is created as an active one. Ignored otherwise. | |
| pager | If L4_NIL_ID is used, the new task is created as inactive. Lthread 0 is not created. Otherwise the new task is created as active and the specified pager is associated to Lthread 0. |
Tasks may be created as active or inactive. For an active task, a new address space is created together with 128 threads. Lthread 0 is started, the other ones wait for a "real" creation using l4_thread_ex_regs(). An inactive task is empty. It occupies no resources, has no address space and no threads. Communication with inactive tasks is not possible.
A newly created task gets the creator as its chief, i.e. it is created inside the creator's clan. Symmetrically, a task can only be deleted either directly by its chief or indirectly by a higher-level chief.
Definition at line 105 of file syscalls-impl.h.
References l4_task_new_sc().
| l4_taskid_t l4_task_new_long | ( | l4_taskid_t | destination, | |
| l4_umword_t | mcp_or_new_chief_and_flags, | |||
| l4_umword_t | esp, | |||
| l4_umword_t | eip, | |||
| l4_threadid_t | pager, | |||
| l4_threadid_t | cap_handler, | |||
| l4_quota_desc_t | kquota, | |||
| l4_utcb_t * | utcb | |||
| ) | [inline] |
Create or delete a task, extended version.
| destination | See l4_task_new description. | |
| mcp_or_new_chief_and_flags | See l4_task_new description. | |
| esp | See l4_task_new description. | |
| eip | See l4_task_new description. | |
| pager | See l4_task_new description. | |
| cap_handler | Set the capability fault handler for this task and starts the task in monitored mode. The task is only allowed to communicate with its creator and itself (+NIL). Every other IPC will raise a capability fault that is sent to the cap_handler thread. | |
| kquota | Set kernel quota for new task. | |
| utcb | UTCB pointer of the caller. |
Definition at line 119 of file syscalls-impl.h.
References l4_utcb_task_new_args::caphandler, l4_task_new_sc(), L4_TASK_NEW_UTCB_ARGS, l4_utcb_task_new_args::quota, and l4_utcb_t::task_new.