L4Re Operating System Framework
Interface and Usage Documentation
|
Namespaces | |
namespace | Util |
Documentation of the L4 Runtime Environment utility functionality in C++. | |
namespace | Vfs |
Virtual file system for interfaces in POSIX libc. | |
Data Structures | |
class | Cap_alloc |
Capability allocator interface. More... | |
class | Console |
Console class. More... | |
class | Dataspace |
Interface for memory-like objects. More... | |
class | Debug_obj |
Debug interface. More... | |
struct | Default_event_payload |
Default event stream payload. More... | |
class | Dma_space |
Managed DMA Address Space. More... | |
class | Env |
C++ interface of the initial environment that is provided to an L4 task. More... | |
class | Event |
Event class. More... | |
class | Event_buffer_t |
Event buffer class. More... | |
class | Inhibitor |
Set of inhibitor locks, which inhibit specific actions when held. More... | |
class | Log |
Log interface class. More... | |
class | Mem_alloc |
Memory allocation interface. More... | |
struct | Mmio_space |
Interface for memory-like address space accessible via IPC. More... | |
class | Namespace |
Name-space interface. More... | |
class | Parent |
Parent interface. More... | |
struct | Random |
Low-bandwidth interface for random number generators. More... | |
class | Rm |
Region map. More... | |
class | Smart_cap_auto |
Helper for Unique_cap and Unique_del_cap. More... | |
class | Smart_count_cap |
Helper for Ref_cap and Ref_del_cap. More... | |
Typedefs | |
template<typename T > | |
using | Shared_cap = L4::Detail::Shared_cap_impl< T, Smart_count_cap< L4_FP_ALL_SPACES > > |
Shared capability that implements automatic free and unmap of the capability selector. | |
template<typename T > | |
using | shared_cap = L4::Detail::Shared_cap_impl< T, Smart_count_cap< L4_FP_ALL_SPACES > > |
Shared capability that implements automatic free and unmap of the capability selector. | |
template<typename T > | |
using | Shared_del_cap = L4::Detail::Shared_cap_impl< T, Smart_count_cap< L4_FP_DELETE_OBJ > > |
Shared capability that implements automatic free and unmap+delete of the capability selector. | |
template<typename T > | |
using | shared_del_cap = L4::Detail::Shared_cap_impl< T, Smart_count_cap< L4_FP_DELETE_OBJ > > |
Shared capability that implements automatic free and unmap+delete of the capability selector. | |
template<typename T > | |
using | Unique_cap = L4::Detail::Unique_cap_impl< T, Smart_cap_auto< L4_FP_ALL_SPACES > > |
Unique capability that implements automatic free and unmap of the capability selector. | |
template<typename T > | |
using | unique_cap = L4::Detail::Unique_cap_impl< T, Smart_cap_auto< L4_FP_ALL_SPACES > > |
Unique capability that implements automatic free and unmap of the capability selector. | |
template<typename T > | |
using | Unique_del_cap = L4::Detail::Unique_cap_impl< T, Smart_cap_auto< L4_FP_DELETE_OBJ > > |
Unique capability that implements automatic free and unmap+delete of the capability selector. | |
template<typename T > | |
using | unique_del_cap = L4::Detail::Unique_cap_impl< T, Smart_cap_auto< L4_FP_DELETE_OBJ > > |
Unique capability that implements automatic free and unmap+delete of the capability selector. | |
Functions | |
void | throw_error (long err, char const *extra="") |
Generate C++ exception. | |
long | chksys (long err, char const *extra="", long ret=0) |
Generate C++ exception on error. | |
long | chksys (l4_msgtag_t const &t, char const *extra="", l4_utcb_t *utcb=l4_utcb(), long ret=0) |
Generate C++ exception on error. | |
long | chksys (l4_msgtag_t const &t, l4_utcb_t *utcb, char const *extra="") |
Generate C++ exception on error. | |
template<typename T > | |
T | chkcap (T &&cap, char const *extra="", long err=-L4_ENOMEM) |
Check for valid capability or raise C++ exception. | |
l4_msgtag_t | chkipc (l4_msgtag_t tag, char const *extra="", l4_utcb_t *utcb=l4_utcb()) |
Test a message tag for IPC errors. | |
template<typename T > | |
Shared_cap< T > | make_shared_cap (L4Re::Cap_alloc *ca) |
Allocate a capability slot and wrap it in a Shared_cap. | |
template<typename T > | |
Shared_del_cap< T > | make_shared_del_cap (L4Re::Cap_alloc *ca) |
Allocate a capability slot and wrap it in a Shared_del_cap. | |
template<typename T > | |
Unique_cap< T > | make_unique_cap (L4Re::Cap_alloc *ca) |
Allocate a capability slot and wrap it in an Unique_cap. | |
template<typename T > | |
Unique_del_cap< T > | make_unique_del_cap (L4Re::Cap_alloc *ca) |
Allocate a capability slot and wrap it in an Unique_del_cap. | |
using L4Re::Shared_cap = typedef L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_ALL_SPACES> > |
Shared capability that implements automatic free and unmap of the capability selector.
T | Type of the object the capability refers to. |
This shared capability implements a counted reference to a capability selector. The capability shall be unmapped and freed when the reference count in the allocator goes to zero.
Definition at line 44 of file shared_cap.
using L4Re::shared_cap = typedef L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_ALL_SPACES> > |
Shared capability that implements automatic free and unmap of the capability selector.
T | Type of the object the capability refers to. |
This shared capability implements a counted reference to a capability selector. The capability shall be unmapped and freed when the reference count in the allocator goes to zero.
Definition at line 47 of file shared_cap.
using L4Re::Shared_del_cap = typedef L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_DELETE_OBJ> > |
Shared capability that implements automatic free and unmap+delete of the capability selector.
T | Type of the object the capability refers to. |
This shared capability implements a counted reference to a capability selector. The capability shall be unmapped and freed when the reference count in the allocator goes to zero. The main difference to Shared_cap is that the unmap is done with the deletion flag enabled and this leads to the deletion of the object if the current task holds appropriate deletion rights.
Definition at line 80 of file shared_cap.
using L4Re::shared_del_cap = typedef L4::Detail::Shared_cap_impl<T, Smart_count_cap<L4_FP_DELETE_OBJ> > |
Shared capability that implements automatic free and unmap+delete of the capability selector.
T | Type of the object the capability refers to. |
This shared capability implements a counted reference to a capability selector. The capability shall be unmapped and freed when the reference count in the allocator goes to zero. The main difference to Shared_cap is that the unmap is done with the deletion flag enabled and this leads to the deletion of the object if the current task holds appropriate deletion rights.
Definition at line 83 of file shared_cap.
using L4Re::Unique_cap = typedef L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_ALL_SPACES> > |
Unique capability that implements automatic free and unmap of the capability selector.
T | Type of the object the capability refers to. |
The ownership of the capability is managed in the same way as unique_ptr.
Definition at line 42 of file unique_cap.
using L4Re::unique_cap = typedef L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_ALL_SPACES> > |
Unique capability that implements automatic free and unmap of the capability selector.
T | Type of the object the capability refers to. |
The ownership of the capability is managed in the same way as unique_ptr.
Definition at line 45 of file unique_cap.
using L4Re::Unique_del_cap = typedef L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_DELETE_OBJ> > |
Unique capability that implements automatic free and unmap+delete of the capability selector.
T | Type of the object the capability refers to. |
The main difference to Unique_cap is that the unmap is done with the deletion flag enabled and this leads to the deletion of the object if the current task holds appropriate deletion rights.
Definition at line 75 of file unique_cap.
using L4Re::unique_del_cap = typedef L4::Detail::Unique_cap_impl<T, Smart_cap_auto<L4_FP_DELETE_OBJ> > |
Unique capability that implements automatic free and unmap+delete of the capability selector.
T | Type of the object the capability refers to. |
The main difference to Unique_cap is that the unmap is done with the deletion flag enabled and this leads to the deletion of the object if the current task holds appropriate deletion rights.
Definition at line 78 of file unique_cap.
|
inline |
Check for valid capability or raise C++ exception.
T | Type of object to check, must be capability-like (L4::Cap, L4Re::Util::Unique_cap etc.) |
cap | Capability value to check. |
extra | Optional text for exception. |
err | Error value for exception or 0 if the capability value should be used. |
This function checks whether the capability is valid. If the capability is invalid an C++ exception is generated, using err if err is not zero, otherwise the capability value is used. A valid capability will just be returned.
Definition at line 145 of file error_helper.
References L4_UNLIKELY, and throw_error().
Referenced by L4virtio::Svr::Dev_config::Dev_config(), L4virtio::Driver::Device::driver_connect(), L4virtio::Svr::Console::Device::register_single_driver_irq(), L4virtio::Driver::Virtio_net_device::setup_device(), and L4virtio::Driver::Block_device::setup_device().
|
inline |
Test a message tag for IPC errors.
tag | Message tag returned by the IPC. |
extra | Exception message in case of error. |
utcb | The UTCB used in the IPC operation. |
tag
is returned. L4::Runtime_exception | with the translated IPC error code |
This function does not check the message tag's label value.
Definition at line 176 of file error_helper.
References chksys(), l4_msgtag_t::has_error(), and L4_UNLIKELY.
|
inline |
Generate C++ exception on error.
t | Message tag. |
extra | Optional text for exception (default "") |
utcb | Option UTCB |
ret | Optional value for exception, default is error value (err) |
This function throws an exception if the message tag contains an error or the label in the message tag is negative. Otherwise the label in the message tag is returned.
Definition at line 89 of file error_helper.
References l4_msgtag_t::has_error(), L4_UNLIKELY, l4_msgtag_t::label(), and throw_error().
|
inline |
Generate C++ exception on error.
t | Message tag. |
utcb | UTCB. |
extra | Optional text for exception (default "") |
This function throws an exception if the message tag contains an error or the label in the message tag is negative. Otherwise the label in the message tag is returned.
Definition at line 112 of file error_helper.
References chksys().
|
inline |
Generate C++ exception on error.
err | Error value, if negative exception will be thrown |
extra | Optional text for exception (default "") |
ret | Optional value for exception, default is error value (err) |
This function throws an exception if the err is negative and otherwise returns err.
Definition at line 68 of file error_helper.
References L4_UNLIKELY, and throw_error().
Referenced by L4virtio::Svr::Driver_mem_list_t< DATA >::add(), chkipc(), chksys(), L4virtio::Svr::Dev_config::Dev_config(), L4virtio::Svr::Console::Device::Device(), L4virtio::Svr::Console::Device::Device(), L4virtio::Svr::Device_t< DATA >::device_notify_irq(), L4virtio::Svr::Device_t< DATA >::device_notify_irq(), L4virtio::Driver::Device::driver_acknowledge(), L4virtio::Driver::Device::driver_connect(), L4virtio::Svr::Driver_mem_region_t< DATA >::Driver_mem_region_t(), L4virtio::Driver::Block_device::process_used_queue(), L4virtio::Svr::Device_t< DATA >::register_driver_irq(), L4virtio::Svr::Device_t< DATA >::register_single_driver_irq(), L4virtio::Svr::Console::Device::register_single_driver_irq(), L4virtio::Svr::Driver_mem_list_t< DATA >::remove(), L4virtio::Driver::Virtio_net_device::setup_device(), L4virtio::Driver::Block_device::setup_device(), L4virtio::Svr::Console::Virtio_con::Virtio_con(), and L4virtio::Driver::Virtio_net_device::wait_rx().
Shared_cap< T > L4Re::make_shared_cap | ( | L4Re::Cap_alloc * | ca | ) |
Allocate a capability slot and wrap it in a Shared_cap.
T | Type of the object the capability refers to. |
ca | Capability allocator to use. |
Definition at line 60 of file shared_cap.
References L4Re::Cap_alloc::alloc().
Shared_del_cap< T > L4Re::make_shared_del_cap | ( | L4Re::Cap_alloc * | ca | ) |
Allocate a capability slot and wrap it in a Shared_del_cap.
T | Type of the object the capability refers to. |
ca | Capability allocator to use. |
Definition at line 96 of file shared_cap.
References L4Re::Cap_alloc::alloc().
Unique_cap< T > L4Re::make_unique_cap | ( | L4Re::Cap_alloc * | ca | ) |
Allocate a capability slot and wrap it in an Unique_cap.
T | Type of the object the capability refers to. |
ca | Capability allocator to use. |
Definition at line 58 of file unique_cap.
References L4Re::Cap_alloc::alloc().
Unique_del_cap< T > L4Re::make_unique_del_cap | ( | L4Re::Cap_alloc * | ca | ) |
Allocate a capability slot and wrap it in an Unique_del_cap.
T | Type of the object the capability refers to. |
ca | Capability allocator to use. |
Definition at line 91 of file unique_cap.
References L4Re::Cap_alloc::alloc().
|
inline |
Generate C++ exception.
err | Error value |
extra | Optional text for exception (default "") |
This function throws an L4 exception. The exact exception type depends on the error value (err). This function does never return.
Definition at line 45 of file error_helper.
References L4_EEXIST, L4_ENOENT, L4_ENOMEM, and L4_ERANGE.
Referenced by chkcap(), chksys(), and chksys().