L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4::Ipc::Small_buf Class Reference

A receive item for receiving a single object capability. More...

#include <ipc_types>

Collaboration diagram for L4::Ipc::Small_buf:

Public Member Functions

 Small_buf (L4::Cap< void > cap, unsigned long flags=0) noexcept
 Create a receive item from a C++ cap.
 Small_buf (l4_cap_idx_t cap, unsigned long flags=0) noexcept
 Create a receive item from a C cap.
l4_umword_t raw () const noexcept
 Return the raw data.

Detailed Description

A receive item for receiving a single object capability.

This class is the main abstraction for receiving object capabilities via Ipc::Istream. To receive an object capability, an instance of Small_buf that refers to an empty capability slot must be inserted into the Ipc::Istream before the receive operation.

In an RPC interface, a Small_buf must be combined with a Snd_fpage output argument. The Small_buf argument is removed from the server function signature. Instead, the adjacent Snd_fpage output argument is used by the server function to send the capability. On the client side, the caller can check the Snd_fpage output argument what has been received. See the following example:

A receive item for receiving a single object capability.
Definition ipc_types:234
Send item or return item.
Definition ipc_types:300
#define L4_RPC(res, name, args, attr...)
Define an RPC call (type and callable).
Definition ipc_iface:542
l4_int16_t l4_ret_t
Return value of an IPC call as well as an RPC call.
Definition types.h:29

Definition at line 233 of file ipc_types.

Constructor & Destructor Documentation

◆ Small_buf() [1/2]

L4::Ipc::Small_buf::Small_buf ( L4::Cap< void > cap,
unsigned long flags = 0 )
inlineexplicitnoexcept

Create a receive item from a C++ cap.

Parameters
capCapability slot where to save the capability.
flagsReceive buffer flags, see l4_msg_item_consts_t. L4_RCV_ITEM_SINGLE_CAP will always be set.

Definition at line 243 of file ipc_types.

References L4_RCV_ITEM_SINGLE_CAP.

◆ Small_buf() [2/2]

L4::Ipc::Small_buf::Small_buf ( l4_cap_idx_t cap,
unsigned long flags = 0 )
inlineexplicitnoexcept

Create a receive item from a C cap.

Parameters
capCapability slot where to save the capability.
flagsReceive buffer flags, see l4_msg_item_consts_t. L4_RCV_ITEM_SINGLE_CAP will always be set.

Definition at line 250 of file ipc_types.

References L4_RCV_ITEM_SINGLE_CAP.


The documentation for this class was generated from the following file: