26 #ifndef __L4SYS__INCLUDE__L4API_FIASCO__IPC_H__
27 #define __L4SYS__INCLUDE__L4API_FIASCO__IPC_H__
30 #include <l4/sys/utcb.h>
451 l4_sndfpage_add_u(
l4_fpage_t const snd_fpage,
unsigned long snd_base,
537 return l4_error_u(tag,
l4_utcb());
542 {
return (l4_utcb_tcr_u(u)->error & 1) == 0; }
545 {
return l4_utcb_tcr_u(u)->
error & 1; }
556 l4_sndfpage_add_u(
l4_fpage_t const snd_fpage,
unsigned long snd_base,
566 v->
mr[i + 1] = snd_fpage.raw;
577 return l4_sndfpage_add_u(snd_fpage, snd_base, tag,
l4_utcb());
#define L4_ALWAYS_INLINE
L4 Inline function attribute.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
unsigned long l4_umword_t
Unsigned machine word.
unsigned long l4_cap_idx_t
L4 Capability selector Type.
@ L4_INVALID_CAP
Invalid capability selector.
@ L4_EIPC_LO
Communication error-range low.
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.
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_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_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_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_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_sleep(l4_timeout_t timeout) L4_NOTHROW
Sleep for an amount of time.
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.
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_SYSF_SEND_AND_WAIT
Send-and-wait flags.
@ L4_SYSF_WAIT
Wait flags (combines receive and open wait).
@ L4_SYSF_CALL
Call flags (combines send and receive).
@ L4_SYSF_SEND
Send-phase flag.
@ L4_SYSF_REPLY_AND_WAIT
Reply-and-wait flags.
@ L4_SYSF_RECV
Receive-phase flag.
long l4_error(l4_msgtag_t tag) L4_NOTHROW
Return error code of a system call return message tag or the tag label.
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_error_code(l4_utcb_t *utcb) L4_NOTHROW
Get the error condition of the last invocation from the TCR.
l4_ipc_tcr_error_t
Error codes in the error TCR.
int l4_ipc_is_rcv_error(l4_utcb_t *utcb) L4_NOTHROW
Returns whether an error occurred in receive phase of an invocation.
l4_umword_t l4_ipc_error(l4_msgtag_t tag, l4_utcb_t *utcb) L4_NOTHROW
Get the error code for an object invocation.
@ L4_IPC_SEABORTED
Send operation aborted.
@ L4_IPC_SND_ERR_MASK
Send error mask.
@ L4_IPC_RECANCELED
Receive operation canceled.
@ L4_IPC_SESNDPFTO
Send-pagefault timeout in send operation.
@ L4_IPC_SETIMEOUT
Timeout during send operation.
@ L4_IPC_ENOT_EXISTENT
Non-existing destination or source.
@ L4_IPC_ERROR_MASK
Mask for error bits.
@ L4_IPC_REMAPFAILED
Map flexpage failed in receive operation.
@ L4_IPC_SEMAPFAILED
Map flexpage failed in send operation.
@ L4_IPC_SECANCELED
Send operation canceled.
@ L4_IPC_REABORTED
Receive operation aborted.
@ L4_IPC_SERCVPFTO
Receive-pagefault timeout in send operation.
@ L4_IPC_SEMSGCUT
Cut send message.
@ L4_IPC_REMSGCUT
Cut receive message, due to message buffer is too small.
@ L4_IPC_RETIMEOUT
Timeout during receive operation.
@ L4_IPC_RESNDPFTO
Send-pagefault timeout in receive operation.
@ L4_IPC_RERCVPFTO
Receive-pagefault timeout in receive operation.
@ L4_ITEM_MAP
Identify a message item as map item.
@ L4_ITEM_CONT
Denote that the following item shall be put into the same receive item as this one.
unsigned l4_msgtag_items(l4_msgtag_t t) L4_NOTHROW
Get the number of typed items.
unsigned l4_msgtag_has_error(l4_msgtag_t t) L4_NOTHROW
Test for error indicator flag.
l4_msgtag_flags
Flags for message tags.
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
unsigned l4_msgtag_words(l4_msgtag_t t) L4_NOTHROW
Get the number of untyped words.
long l4_msgtag_label(l4_msgtag_t t) L4_NOTHROW
Get the protocol of tag.
@ L4_UTCB_GENERIC_DATA_SIZE
Total number of message register (MRs) available.
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
long l4_ipc_to_errno(unsigned long ipc_error_code) L4_NOTHROW
Get a negative error code for the given IPC error code.
Common L4 ABI Data Types.
Message tag data structure.
l4_umword_t error
System call error codes.
Encapsulation of the message-register block in the UTCB.
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.