L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
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 IPC error code for an IPC operation.
 
long l4_error (l4_msgtag_t tag) L4_NOTHROW
 Get IPC error code if any or message tag label otherwise for an IPC call.
 
int l4_ipc_is_snd_error (l4_utcb_t *utcb) L4_NOTHROW
 Returns whether an error occurred in send phase of an invocation.
 
int l4_ipc_is_rcv_error (l4_utcb_t *utcb) L4_NOTHROW
 Returns whether an error occurred in receive phase of an invocation.
 
int l4_ipc_error_code (l4_utcb_t *utcb) L4_NOTHROW
 Get the error condition of the last invocation from the TCR.
 
long l4_ipc_to_errno (unsigned long ipc_error_code) L4_NOTHROW
 Get a negative error code for the given IPC error code.
 
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).
 
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.
 
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.
 
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).
 
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).
 
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.
 
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.
 
l4_msgtag_t l4_ipc_sleep (l4_timeout_t timeout) L4_NOTHROW
 Sleep for an amount of time.
 
l4_msgtag_t l4_ipc_sleep_ms (unsigned ms) L4_NOTHROW
 Sleep for a certain amount of milliseconds.
 
l4_msgtag_t l4_ipc_sleep_us (unsigned us) L4_NOTHROW
 Sleep for a certain amount of microseconds.
 
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.
 

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 546 of file ipc.h.

References L4_EIPC_LO.