L4Re – L4 Runtime Environment
|
C++ Factory interface. More...
Data Structures | |
struct | Lstr |
Special type to add a pascal string into the factory create stream. More... | |
struct | Nil |
Special type to add a void argument into the factory create stream. More... | |
class | S |
Stream class for the create() argument stream. More... | |
Public Member Functions | |
S | create (Cap< void > target, long obj, l4_utcb_t *utcb=l4_utcb()) noexcept |
Generic create call to the factory. More... | |
template<typename OBJ > | |
S | create (Cap< OBJ > target, l4_utcb_t *utcb=l4_utcb()) noexcept |
Create call for typed capabilities. More... | |
l4_msgtag_t | create_task (Cap< Task > const &target_cap, l4_fpage_t const &utcb_area, l4_utcb_t *utcb=l4_utcb()) noexcept |
Create a new task. More... | |
l4_msgtag_t | create_thread (Cap< Thread > const &target_cap, l4_utcb_t *utcb=l4_utcb()) noexcept |
Create a new thread. More... | |
l4_msgtag_t | create_factory (Cap< Factory > const &target_cap, unsigned long limit, l4_utcb_t *utcb=l4_utcb()) noexcept |
Create a new factory. More... | |
l4_msgtag_t | create_gate (Cap< void > const &target_cap, Cap< Thread > const &thread_cap, l4_umword_t label, l4_utcb_t *utcb=l4_utcb()) noexcept |
Create a new IPC gate. More... | |
l4_msgtag_t | create_irq (Cap< Irq >const &target_cap, l4_utcb_t *utcb=l4_utcb()) throw () |
Create a new IRQ. More... | |
l4_msgtag_t | create_vm (Cap< Vm >const &target_cap, l4_utcb_t *utcb=l4_utcb()) noexcept |
Create a new virtual machine. More... | |
![]() | |
l4_msgtag_t | dec_refcnt (l4_mword_t diff, l4_utcb_t *utcb=l4_utcb()) |
Decrement the in kernel reference counter for the object. More... | |
Additional Inherited Members | |
![]() | |
typedef Factory | Class |
The target interface type (inheriting from Kobject_t) | |
typedef Typeid::Iface< PROTO, Factory > | __Iface |
The interface description for the derived class. | |
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Base::__Iface_list > | __Iface_list |
The list of all RPC interfaces provided directly or through inheritance. | |
![]() | |
L4::Cap< Class > | c () const noexcept |
Get the capability to ourselves. | |
![]() | |
l4_cap_idx_t | cap () const noexcept |
Return capability selector. More... | |
![]() | |
static void | __check_protocols__ () noexcept |
Helper to check for protocol conflicts. | |
C++ Factory interface.
Factories provide an interface to create objects which are accessed via capabilities.
For additional information about which objects can be created via this interface, see server-specific information in Kernel Factory and L4Re Servers.
For the C interface refer to Factory.
|
inlinenoexcept |
Create call for typed capabilities.
OBJ | Capability type of the object to be created. |
[out] | target | Capability of type OBJ. |
utcb | UTCB to use. |
This method does not directly invoke the factory. The factory is invoked when the create stream returned by this method is converted to an l4_msgtag_t
, or otherwise when the stream goes out of scope.
l4_msgtag_t
, other UTCB-using operations must not be used.Usage:
Definition at line 308 of file factory.
References L4::Kobject::cap().
Generic create call to the factory.
[out] | target | Capability selector for the new object. The caller must allocate the capability slot. The kernel stores the new objects's capability into this slot. |
obj | The protocol ID that specifies which kind of object shall be created. | |
utcb | The UTCB to use for the operation. |
This method does not directly invoke the factory. The factory is invoked when the create stream returned by this method is converted to an l4_msgtag_t
, or otherwise when the stream goes out of scope.
l4_msgtag_t
, other UTCB-using operations must not be used.Definition at line 277 of file factory.
References L4::Kobject::cap().
Referenced by L4Re::Mem_alloc::alloc().
|
inlinenoexcept |
Create a new factory.
[out] | target_cap | The kernel stores the new factory's capability into this slot. |
limit | Limit for the new factory in bytes. | |
utcb | The UTCB to use for the operation. |
limit
(quota) of the new factory is subtracted from the limit of the factory invoked on its creation.Definition at line 383 of file factory.
References L4::Cap_base::cap(), L4::Kobject::cap(), and l4_factory_create_factory_u().
|
inlinenoexcept |
Create a new IPC gate.
[out] | target_cap | The kernel stores the new IPC gate's capability into this slot. |
thread_cap | Optional capability selector of the thread to bind the gate to. Use L4_INVALID_CAP to create an unbound IPC gate. | |
label | Optional label of the gate (is used if thread_cap is valid). | |
utcb | The UTCB to use for the operation. |
L4_EOK | No error occurred. |
-L4_ENOMEM | Out-of-memory during allocation of the Ipc_gate object. |
-L4_ENOENT | thread_cap is void or points to something that is not a thread. |
-L4_EPERM | No L4_CAP_FPAGE_S rights on thread_cap . |
An unbound IPC gate can be bound to a thread using L4::Ipc_gate::bind_thread().
Definition at line 416 of file factory.
References L4::Cap_base::cap(), L4::Kobject::cap(), and l4_factory_create_gate_u().
|
inline |
Create a new IRQ.
[out] | target_cap | The kernel stores the new IRQ's capability into this slot. |
utcb | The UTCB to use for the operation. |
create()
with Cap<Irq>
as argument instead.Definition at line 434 of file factory.
References L4::Cap_base::cap(), L4::Kobject::cap(), and l4_factory_create_irq_u().
|
inlinenoexcept |
Create a new task.
[out] | target_cap | The kernel stores the new task's capability into this slot. |
utcb_area | Flexpage that describes an area in the address space of the new task, where the kernel should map the kernel-allocated kernel-user memory to. The kernel uses the kernel-user memory to store UTCBs and vCPU state-save-areas of the new task. | |
utcb | The UTCB to use for the operation. |
Definition at line 341 of file factory.
References L4::Cap_base::cap(), L4::Kobject::cap(), and l4_factory_create_task_u().
|
inlinenoexcept |
Create a new thread.
[out] | target_cap | The kernel stores the new thread's capability into this slot. |
utcb | The UTCB to use for the operation. |
create()
with Cap<Thread>
as argument instead.Definition at line 359 of file factory.
References L4::Cap_base::cap(), L4::Kobject::cap(), and l4_factory_create_thread_u().
|
inlinenoexcept |
Create a new virtual machine.
[out] | target_cap | The kernel stores the new VM's capability into this slot. |
utcb | The UTCB to use for the operation. |
create()
with Cap<Vm>
as argument instead.Definition at line 452 of file factory.
References L4::Cap_base::cap(), L4::Kobject::cap(), and l4_factory_create_vm_u().