L4Re - L4 Runtime Environment
L4Re Namespace Reference

L4Re C++ Interfaces. More...

Namespaces

 Vfs
 Virtual file system for interfaces 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...
 
class  Dma_space
 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...
 
class  Rm
 Region map. More...
 
class  Smart_cap_auto
 Helper for Auto_cap and Auto_del_cap. More...
 

Functions

long chksys (long err, char const *extra="", long ret=0)
 Generate C++ exception on error. More...
 
long chksys (l4_msgtag_t const &t, char const *extra="", l4_utcb_t *utcb=l4_utcb(), long ret=0)
 Generate C++ exception on error. More...
 
long chksys (l4_msgtag_t const &t, l4_utcb_t *utcb, char const *extra="")
 Generate C++ exception on error. More...
 
template<typename T >
chkcap (T &&cap, char const *extra="", long err=-L4_ENOMEM)
 Check for valid capability or raise C++ exception. More...
 
l4_msgtag_t chkipc (l4_msgtag_t tag, char const *extra="", l4_utcb_t *utcb=l4_utcb())
 Test a message tag for IPC errors. More...
 

Detailed Description

L4Re C++ Interfaces.

Shared_cap / Shared_del_cap.

Unique_cap / Unique_del_cap.

L4 Runtime Environment.

Function Documentation

◆ chkcap()

template<typename T >
T L4Re::chkcap ( T &&  cap,
char const *  extra = "",
long  err = -L4_ENOMEM 
)
inline

Check for valid capability or raise C++ exception.

Template Parameters
TType of object to check, must be capability-like (L4::Cap, L4Re::Util::Auto_cap etc.)
Parameters
capCapability value to check.
extraOptional text for exception.
errError 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 140 of file error_helper.

◆ chkipc()

l4_msgtag_t L4Re::chkipc ( l4_msgtag_t  tag,
char const *  extra = "",
l4_utcb_t utcb = l4_utcb() 
)
inline

Test a message tag for IPC errors.

Parameters
tagMessage tag returned by the IPC.
extraException message in case of error.
utcbThe UTCB used in the IPC operation.
Returns
On IPC error an exception is thrown, otherwise tag is returned.
Exceptions
L4::Runtime_exceptionwith the translated IPC error code

This function does not check the message tag's label value.

Note
This must be called on a message tag before the UTCB is changed.

Definition at line 171 of file error_helper.

◆ chksys() [1/3]

long L4Re::chksys ( long  err,
char const *  extra = "",
long  ret = 0 
)
inline

Generate C++ exception on error.

Parameters
errError value, if negative exception will be thrown
extraOptional text for exception (default "")
retOptional 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 63 of file error_helper.

◆ chksys() [2/3]

long L4Re::chksys ( l4_msgtag_t const &  t,
char const *  extra = "",
l4_utcb_t utcb = l4_utcb(),
long  ret = 0 
)
inline

Generate C++ exception on error.

Parameters
tMessage tag.
extraOptional text for exception (default "")
utcbOption UTCB
retOptional 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 84 of file error_helper.

◆ chksys() [3/3]

long L4Re::chksys ( l4_msgtag_t const &  t,
l4_utcb_t utcb,
char const *  extra = "" 
)
inline

Generate C++ exception on error.

Parameters
tMessage tag.
utcbUTCB.
extraOptional 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 107 of file error_helper.