L4Re - L4 Runtime Environment
ipc.h File Reference

Common IPC interface. More...

#include <l4/sys/types.h>
#include <l4/sys/utcb.h>
#include <l4/sys/err.h>
+ Include dependency graph for ipc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  l4_ipc_tcr_error_t {
  L4_IPC_ERROR_MASK = 0x1F, L4_IPC_SND_ERR_MASK = 0x01, L4_IPC_ENOT_EXISTENT = 0x04, L4_IPC_RETIMEOUT = 0x03,
  L4_IPC_SETIMEOUT = 0x02, L4_IPC_RECANCELED = 0x07, L4_IPC_SECANCELED = 0x06, L4_IPC_REMAPFAILED = 0x11,
  L4_IPC_SEMAPFAILED = 0x10, L4_IPC_RESNDPFTO = 0x0b, L4_IPC_SESNDPFTO = 0x0a, L4_IPC_RERCVPFTO = 0x0d,
  L4_IPC_SERCVPFTO = 0x0c, L4_IPC_REABORTED = 0x0f, L4_IPC_SEABORTED = 0x0e, L4_IPC_REMSGCUT = 0x09,
  L4_IPC_SEMSGCUT = 0x08
}
 Error codes in the error TCR. More...
 

Functions

l4_umword_t l4_ipc_error (l4_msgtag_t tag, l4_utcb_t *utcb) L4_NOTHROW
 Get the error code for an object invocation. More...
 
long l4_error (l4_msgtag_t tag) L4_NOTHROW
 Return error code of a system call return message tag. More...
 
int l4_ipc_is_snd_error (l4_utcb_t *utcb) L4_NOTHROW
 Returns whether an error occurred in send phase of an invocation. More...
 
int l4_ipc_is_rcv_error (l4_utcb_t *utcb) L4_NOTHROW
 Returns whether an error occurred in receive phase of an invocation. More...
 
int l4_ipc_error_code (l4_utcb_t *utcb) L4_NOTHROW
 Get the error condition of the last invocation from the TCR. More...
 
long l4_ipc_to_errno (unsigned long ipc_error_code) L4_NOTHROW
 Get a negative error code for the given IPC error code. More...
 
l4_msgtag_t l4_ipc_send (l4_cap_idx_t dest, l4_utcb_t *utcb, l4_msgtag_t tag, l4_timeout_t timeout) L4_NOTHROW
 Send a message to an object (do not wait for a reply). More...
 
l4_msgtag_t l4_ipc_wait (l4_utcb_t *utcb, l4_umword_t *label, l4_timeout_t timeout) L4_NOTHROW
 Wait for an incoming message from any possible sender. More...
 
l4_msgtag_t l4_ipc_receive (l4_cap_idx_t object, l4_utcb_t *utcb, l4_timeout_t timeout) L4_NOTHROW
 Wait for a message from a specific source. More...
 
l4_msgtag_t l4_ipc_call (l4_cap_idx_t object, l4_utcb_t *utcb, l4_msgtag_t tag, l4_timeout_t timeout) L4_NOTHROW
 Object call (usual invocation). More...
 
l4_msgtag_t l4_ipc_reply_and_wait (l4_utcb_t *utcb, l4_msgtag_t tag, l4_umword_t *label, l4_timeout_t timeout) L4_NOTHROW
 Reply and wait operation (uses the reply capability). More...
 
l4_msgtag_t l4_ipc_send_and_wait (l4_cap_idx_t dest, l4_utcb_t *utcb, l4_msgtag_t tag, l4_umword_t *label, l4_timeout_t timeout) L4_NOTHROW
 Send a message and do an open wait. More...
 
L4_ALWAYS_INLINE l4_msgtag_t l4_ipc (l4_cap_idx_t dest, l4_utcb_t *utcb, l4_umword_t flags, l4_umword_t slabel, l4_msgtag_t tag, l4_umword_t *rlabel, l4_timeout_t timeout) L4_NOTHROW
 Generic L4 object invocation. More...
 
l4_msgtag_t l4_ipc_sleep (l4_timeout_t timeout) L4_NOTHROW
 Sleep for an amount of time. More...
 
int l4_sndfpage_add (l4_fpage_t const snd_fpage, unsigned long snd_base, l4_msgtag_t *tag) L4_NOTHROW
 Add a flex-page to be sent to the UTCB. More...
 

Detailed Description

Common IPC interface.

Definition in file ipc.h.

Function Documentation

◆ l4_ipc_to_errno()

long l4_ipc_to_errno ( unsigned long  ipc_error_code)
inline

Get a negative error code for the given IPC error code.

Parameters
ipc_error_codeIPC error code as delivered by the kernel. (or returned by the l4_ipc_error_code() function).
Returns
negative error code in the range of L4_EIPC_LO to L4_EIPC_HI.

Definition at line 441 of file ipc.h.

References L4_EIPC_LO.