![]() |
L4Re Operating System Framework
Interface and Usage Documentation
|
IPC related functionality. More...
Namespaces | |
namespace | Msg |
IPC Message related functionality. | |
Data Structures | |
struct | Array |
Array data type for dynamically sized arrays in RPCs. More... | |
struct | Array_in_buf |
Server-side copy in buffer for Array. More... | |
struct | Array_ref |
Array reference data type for arrays located in the message. More... | |
struct | As_value |
Pass the argument as plain data value. More... | |
struct | Call |
RPC attribute for a standard RPC call. More... | |
struct | Call_t |
RPC attribute for an RPC call with required rights. More... | |
struct | Call_zero_send_timeout |
RPC attribute for an RPC call, with zero send timeout. More... | |
class | Cap |
Capability type for RPC interfaces (see L4::Cap<T> ). More... | |
class | Gen_fpage |
Generic RPC base for typed message items. More... | |
struct | In_out |
Mark an argument as in-out argument. More... | |
class | Iostream |
Input/Output stream for IPC [un]marshalling. More... | |
class | Istream |
Input stream for IPC unmarshalling. More... | |
class | Msg_ptr |
Pointer to an element of type T in an Ipc::Istream. More... | |
struct | Opt |
Attribute for defining an optional RPC argument. More... | |
class | Ostream |
Output stream for IPC marshalling. More... | |
struct | Out |
Mark an argument as a output value in an RPC signature. More... | |
class | Rcv_fpage |
Non-small receive item. More... | |
struct | Ret_array |
Dynamically sized output array of type T. More... | |
struct | Send_only |
RPC attribute for a send-only RPC. More... | |
class | Small_buf |
A receive item for receiving a single object capability. More... | |
class | Snd_fpage |
Send item or return item. More... | |
class | Str_cp_in |
Abstraction for extracting a zero-terminated string from an Ipc::Istream. More... | |
class | Varg |
Variably sized RPC argument. More... | |
class | Varg_list |
Self-contained list of variable-sized RPC parameters. More... | |
class | Varg_list_ref |
List of variable-sized RPC parameters as received by the server. More... | |
Typedefs | |
typedef unsigned short | Array_len_default |
Default type for passing length of an array. | |
Functions | |
template<typename T > | |
Cap< T > | make_cap (L4::Cap< T > cap, unsigned rights) noexcept |
Make an L4::Ipc::Cap<T> for the given capability and rights. | |
template<typename T > | |
Cap< T > | make_cap_rw (L4::Cap< T > cap) noexcept |
Make an L4::Ipc::Cap<T> for the given capability with L4_CAP_FPAGE_RW rights. | |
template<typename T > | |
Cap< T > | make_cap_rws (L4::Cap< T > cap) noexcept |
Make an L4::Ipc::Cap<T> for the given capability with L4_CAP_FPAGE_RWS rights. | |
template<typename T > | |
Cap< T > | make_cap_full (L4::Cap< T > cap) noexcept |
Make an L4::IPC::Cap<T> for the given capability with full fpage and object-specific rights. | |
template<typename T > | |
Internal::Buf_cp_out< T > | buf_cp_out (T const *v, unsigned long size) |
Insert an array into an Ipc::Ostream. | |
template<typename T > | |
Internal::Buf_cp_in< T > | buf_cp_in (T *v, unsigned long &size) |
Extract an array from an Ipc::Istream. | |
template<typename T > | |
Str_cp_in< T > | str_cp_in (T *v, unsigned long &size) |
Create a Str_cp_in for the given values. | |
template<typename T > | |
Msg_ptr< T > | msg_ptr (T *&p) |
Create an Msg_ptr to adjust the given pointer. | |
template<typename T > | |
Internal::Buf_in< T > | buf_in (T *&v, unsigned long &size) |
Return a pointer to stream array data. | |
template<typename T > | |
T | read (Istream &s) |
Read a value out of a stream. | |
IPC related functionality.
Internal::Buf_cp_in< T > L4::Ipc::buf_cp_in | ( | T * | v, |
unsigned long & | size | ||
) |
Extract an array from an Ipc::Istream.
v | Pointer to the array that shall receive the values from the Ipc::Istream. | |
[in,out] | size | Input: the number of elements the array can take at most Output: the number of elements found in the stream. |
buf_cp_in() can be used to extract an array from an Ipc::Istream. This is the counterpart buf_cp_out(). The data from the received message is thereby copied to the given buffer and size is set to the number of elements found in the stream. To avoid the copy operation buf_in() may be used instead.
Definition at line 159 of file ipc_stream.
Internal::Buf_cp_out< T > L4::Ipc::buf_cp_out | ( | T const * | v, |
unsigned long | size | ||
) |
Insert an array into an Ipc::Ostream.
v | Pointer to the array that shall be inserted into an Ipc::Ostream. |
size | Number of elements in the array. |
This function inserts an array (e.g. a string) into an Ipc::Ostream. The data is copied to the stream. On insertion into the Ipc::Ostream exactly the given number of elements of type T are copied to the message buffer, this means the source buffer is no longer referenced after insertion into the stream.
Definition at line 100 of file ipc_stream.
Internal::Buf_in< T > L4::Ipc::buf_in | ( | T *& | v, |
unsigned long & | size | ||
) |
Return a pointer to stream array data.
[out] | v | Pointer to the array within the Ipc::Istream. |
[out] | size | The number of elements found in the stream. |
This routine provides a possibility to extract an array from an Ipc::Istream, without extra copy overhead. In contrast to buf_cp_in() the data is not copied to a buffer, but a pointer to the array is returned. The user must make sure the UTCB is not used for other purposes while the returned pointer is still in use.
The mechanism is comparable to that of Msg_ptr, however it handles arrays inserted with buf_cp_out().
Definition at line 310 of file ipc_stream.
Make an L4::Ipc::Cap<T> for the given capability and rights.
T | (IMPLICIT) type of the referenced interface |
cap | source capability (L4::Cap<T>) |
rights | rights mask that shall be applied on transfer. |
Definition at line 785 of file ipc_types.
Referenced by L4virtio::Svr::Driver_mem_region_t< DATA >::Driver_mem_region_t(), and Switch_factory::op_create().
Make an L4::IPC::Cap<T> for the given capability with full fpage and object-specific rights.
T | (implicit) type of the referenced interface |
cap | source capability (L4::Cap<T>) |
Definition at line 823 of file ipc_types.
References L4_CAP_FPAGE_RWSD, and L4_FPAGE_C_OBJ_RIGHTS.
Make an L4::Ipc::Cap<T> for the given capability with L4_CAP_FPAGE_RW rights.
T | (IMPLICIT) type of the referenced interface |
cap | source capability (L4::Cap<T>) |
Definition at line 795 of file ipc_types.
References L4_CAP_FPAGE_RW.
Referenced by L4Re::Util::Event_buffer_t< PAYLOAD >::attach(), L4virtio::Driver::Device::driver_connect(), L4Re::Util::Event_t< PAYLOAD >::init(), L4Re::Util::Event_t< PAYLOAD >::init_poll(), L4virtio::Driver::Device::register_ds(), L4virtio::Driver::Virtio_net_device::setup_device(), and L4virtio::Driver::Block_device::setup_device().
Make an L4::Ipc::Cap<T> for the given capability with L4_CAP_FPAGE_RWS rights.
T | (IMPLICIT) type of the referenced interface |
cap | source capability (L4::Cap<T>) |
Definition at line 805 of file ipc_types.
References L4_CAP_FPAGE_RWS.
Msg_ptr< T > L4::Ipc::msg_ptr | ( | T *& | p | ) |
Create an Msg_ptr to adjust the given pointer.
This function makes it more convenient to extract pointers to data in the message buffer itself from an Ipc::Istream. This may be used to avoid copy out of large data structures. (See Msg_ptr.)
Definition at line 252 of file ipc_stream.
|
inline |
Read a value out of a stream.
s | An Istream. |
T
.The stream position is progressed accordingly.
Definition at line 1289 of file ipc_stream.
Str_cp_in< T > L4::Ipc::str_cp_in | ( | T * | v, |
unsigned long & | size | ||
) |
Create a Str_cp_in for the given values.
v | Pointer to the array that shall receive the values from the Ipc::Istream. | |
[in,out] | size | Input: the number of elements the array can take at most Output: the number of elements found in the stream. |
This function makes it more convenient to extract arrays from an Ipc::Istream (
Definition at line 213 of file ipc_stream.