![]() |
L4Re Operating System Framework
Interface and Usage Documentation
|
C factory interface to create objects, see L4::Factory for the C++ interface. More...
C factory interface to create objects, see L4::Factory for the C++ interface.
A factory is used to create all kinds of kernel objects:
To create a new kernel object the caller has to specify the factory to use for creation. The caller has to allocate a capability slot where the kernel stores the new object's capability.
The factory is equipped with a limit that limits the amount of kernel memory available for that factory.
For the C++ interface refer to L4::Factory.
|
inline |
Create a new object.
factory | Factory to use for creation. | |
obj | Protocol ID to describe the type of the object to create. | |
[out] | target | The kernel stores the new objects's capability into this slot. |
L4_EOK | No error occurred. |
-L4_EPERM | Insufficient permissions; see precondition. |
<0 | Error code. |
factory
must have the permission L4_CAP_FPAGE_S. Definition at line 707 of file factory.h.
References l4_utcb().
|
inline |
Create a new factory.
factory | Capability selector for factory to use for creation. | |
[out] | target_cap | The kernel stores the new factory's capability into this slot. |
limit | Limit for the new factory in bytes. |
L4_EOK | No error occurred. |
-L4_EPERM | Insufficient permissions; see precondition. |
<0 | Error code. |
factory
must have the permission L4_CAP_FPAGE_S.Definition at line 545 of file factory.h.
References l4_utcb().
|
inline |
Create a new IPC gate, optionally bound to a send destination (a thread or thread group).
factory | Capability selector for factory to use for creation. | |
[out] | target_cap | The kernel stores the new IPC gate's capability into this slot. |
snd_dst_cap | Optional capability selector of a thread or thread group to bind the gate to. Use L4_INVALID_CAP to create an unbound IPC gate. | |
label | Optional label of the gate (precisely used if snd_dst_cap is valid). If snd_dst_cap is valid, label must be present. |
L4_EOK | No error occurred. |
-L4_ENOMEM | Out-of-memory during allocation of the Ipc_gate object. |
-L4_EINVAL | snd_dst_cap is void or points to something that is not a thread or thread group. |
-L4_EPERM | Insufficient permissions; see precondition. |
factory
must have the permission L4_CAP_FPAGE_S. Also snd_dst_cap
(if not L4_INVALID_CAP) must have the permission L4_CAP_FPAGE_S.An unbound IPC gate can be bound to a thread using l4_rcv_ep_bind_thread().
Definition at line 553 of file factory.h.
References l4_utcb().
|
inline |
Create a new IRQ sender.
factory | Factory to use for creation. | |
[out] | target_cap | The kernel stores the new IRQ's capability into this slot. |
L4_EOK | No error occurred. |
-L4_EPERM | Insufficient permissions; see precondition. |
<0 | Error code. |
factory
must have the permission L4_CAP_FPAGE_S.Definition at line 561 of file factory.h.
References l4_utcb().
|
inline |
Create a new task.
factory | Capability selector for factory to use for creation. | |
[out] | target_cap | The kernel stores the new task's capability into this slot. |
[in,out] | utcb_area | Pointer to flexpage that describes an area of kernel-user memory that can be used for UTCBs and vCPU state-save-areas of the new task. |
On systems without MMU, the flexpage is adjusted to reflect the acually allocated physical address.
L4_EOK | No error occurred. |
-L4_EPERM | Insufficient permissions; see precondition. |
<0 | Error code. |
factory
must have the permission L4_CAP_FPAGE_S.Definition at line 531 of file factory.h.
References l4_utcb().
|
inline |
Create a new thread.
factory | Capability selector for factory to use for creation. | |
[out] | target_cap | The kernel stores the new thread's capability into this slot. |
L4_EOK | No error occurred. |
-L4_EPERM | Insufficient permissions; see precondition. |
<0 | Error code. |
factory
must have the permission L4_CAP_FPAGE_S.Definition at line 538 of file factory.h.
References l4_utcb().
|
inline |
Create a new thread group.
An IPC endpoint can be bound to a thread group. When a message arrives at the IPC endpoint, a specific thread of the thread group is selected to actually receive the message. A thread group is a send destination for an IPC endpoint.
factory | Capability selector for factory to use for creation. | |
[out] | target_cap | The kernel stores the new thread group's capability into this slot. |
policy | Policy parameter for the thread group. See L4_thread_group_policy for a list of supported values. |
L4_EOK | No error occurred. |
-L4_ENOMEM | Out-of-memory during allocation of the thread group object. |
-L4_EINVAL | Invalid policy parameter. |
-L4_EPERM | The factory instance requires L4_CAP_FPAGE_S rights on factory and L4_CAP_FPAGE_S is not present. |
<0 | Error code. |
Definition at line 582 of file factory.h.
References l4_utcb().
|
inline |
Create a new vCPU context.
A vCPU context typically represents a hardware structure that captures the state of a vCPU on a CPU (e.g. VMX VMCS).
factory | Capability selector for factory to use for creation. | |
[out] | target_cap | The kernel stores the new vCPU context's capability into this slot. |
L4_EOK | No error occurred. |
-L4_EPERM | Insufficient permissions; see precondition. |
<0 | Error code. |
factory
must have the permission L4_CAP_FPAGE_S.Definition at line 575 of file factory.h.
References l4_utcb().
|
inline |
Create a new virtual machine.
factory | Capability selector for factory to use for creation. | |
[out] | target_cap | The kernel stores the new VM's capability into this slot. |
L4_EOK | No error occurred. |
-L4_EPERM | Insufficient permissions; see precondition. |
<0 | Error code. |
factory
must have the permission L4_CAP_FPAGE_S.Definition at line 568 of file factory.h.
References l4_utcb().