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 | 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 648 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 | 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 495 of file factory.h.
References l4_utcb().
|
inline |
Create a new IPC gate.
factory | Capability selector for factory to use for creation. | |
[out] | target_cap | The kernel stores the new IPC gate's capability into this slot. |
thread_cap | Optional capability selector of a thread to bind the gate to. Use L4_INVALID_CAP to create an unbound IPC gate. | |
label | Optional label of the gate (precisely used if thread_cap is valid). If thread_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 | thread_cap is void or points to something that is not a thread. |
-L4_EPERM | No L4_CAP_FPAGE_S rights on factory or thread_cap . |
An unbound IPC gate can be bound to a thread using l4_rcv_ep_bind_thread().
Definition at line 503 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 | 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 511 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 | 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 481 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 | 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 488 of file factory.h.
References l4_utcb().
|
inline |
Create a new hardware vCPU context.
A hardware vCPU context typically represents a hardware vCPU control structure (e.g. VMX VMCS).
factory | Capability selector for factory to use for creation. | |
[out] | target_cap | The kernel stores the new hardware vCPU context's capability into this slot. |
L4_EOK | No error occurred. |
-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 525 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 | 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 518 of file factory.h.
References l4_utcb().