L4Re - L4 Runtime Environment
|
Go to the documentation of this file.
27 #ifndef _L4_SYS_UTCB_H
28 #define _L4_SYS_UTCB_H
32 #include <l4/sys/l4int.h>
342 #ifdef L4SYS_USE_UTCB_WRAP
343 return l4_utcb_wrap();
345 return l4_utcb_direct();
353 {
return l4_utcb_mr_u(
l4_utcb()); }
356 {
return l4_utcb_br_u(
l4_utcb()); }
359 {
return l4_utcb_tcr_u(
l4_utcb()); }
362 {
return l4_utcb_exc_u(
l4_utcb()); }
365 { l4_utcb_inherit_fpu_u(
l4_utcb(), switch_on); }
378 ((
union T*)(l4_utcb_br_u(utcb)->
br + pos))->t = val;
384 {
return l4_timeout_abs_u(val, pos,
l4_utcb()); }
unsigned long l4_utcb_exc_typeval(l4_exc_regs_t const *u) L4_NOTHROW L4_PURE
Get the value out of an exception UTCB that describes the type of exception.
Encapsulation of the thread-control-register block of the UTCB.
struct l4_buf_regs_t l4_buf_regs_t
Encapsulation of the buffer-registers block in the UTCB.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
l4_utcb_t * l4_utcb(void) L4_NOTHROW L4_PURE
Get the UTCB address.
@ L4_UTCB_BUF_REGS_OFFSET
Offset of BR[0] relative to the UTCB pointer.
l4_umword_t l4_utcb_exc_pc(l4_exc_regs_t const *u) L4_NOTHROW L4_PURE
Access function to get the program counter of the exception state.
union l4_msg_regs_t l4_msg_regs_t
Encapsulation of the message-register block in the UTCB.
unsigned long long l4_uint64_t
Unsigned 64bit value.
l4_uint64_t l4_kernel_clock_t
Kernel clock type.
l4_thread_regs_t * l4_utcb_tcr(void) L4_NOTHROW L4_PURE
Get the thread-control-register block of a UTCB.
@ L4_UTCB_THREAD_REGS_OFFSET
Offset of TCR[0] relative to the UTCB pointer.
int l4_utcb_exc_is_pf(l4_exc_regs_t const *u) L4_NOTHROW L4_PURE
Check whether an exception IPC is a page fault.
int l4_utcb_exc_is_ex_regs_exception(l4_exc_regs_t const *u) L4_NOTHROW L4_PURE
Check whether an exception IPC was triggered via l4_thread_ex_regs().
l4_addr_t l4_utcb_exc_pfa(l4_exc_regs_t const *u) L4_NOTHROW L4_PURE
Function to get the L4 style page fault address out of an exception.
unsigned l4_utcb_mr64_idx(unsigned idx) L4_NOTHROW
Get index into 64bit message registers alias from native-sized index.
void l4_utcb_exc_pc_set(l4_exc_regs_t *u, l4_addr_t pc) L4_NOTHROW
Set the program counter register in the exception state.
Basic timeout specification.
l4_timeout_t xfer
Message transfer timeout.
Encapsulation of the message-register block in the UTCB.
l4_umword_t bdr
Buffer descriptor.
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.
struct l4_thread_regs_t l4_thread_regs_t
Encapsulation of the thread-control-register block of the UTCB.
l4_umword_t user[3]
User values (ignored and preserved by the kernel)
l4_uint16_t t
timeout value
unsigned long l4_addr_t
Address type.
void l4_utcb_inherit_fpu(int switch_on) L4_NOTHROW
Enable or disable inheritance of FPU state to receiver.
L4 compiler related defines.
#define __END_DECLS
End section with C types and functions.
UTCB structure for exceptions.
@ L4_UTCB_GENERIC_DATA_SIZE
Total number of message register (MRs) available.
Encapsulation of the buffer-registers block in the UTCB.
l4_uint64_t mr64[L4_UTCB_GENERIC_DATA_SIZE/(sizeof(l4_uint64_t)/sizeof(l4_umword_t))]
Message registers 64bit alias.
#define L4_CV
Define calling convention.
@ L4_UTCB_MSG_REGS_OFFSET
Offset of MR[0] relative to the UTCB pointer.
l4_exc_regs_t * l4_utcb_exc(void) L4_NOTHROW L4_PURE
Get the message-register block of a UTCB (for an exception IPC).
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
l4_buf_regs_t * l4_utcb_br(void) L4_NOTHROW L4_PURE
Get the buffer-register block of a UTCB.
unsigned long l4_umword_t
Unsigned machine word.
l4_umword_t error
System call error codes.
Common L4 ABI Data Types.
l4_msg_regs_t * l4_utcb_mr(void) L4_NOTHROW L4_PURE
Get the message-register block of a UTCB.
@ L4_UTCB_INHERIT_FPU
BDR flag to accept reception of FPU state.
l4_umword_t br[L4_UTCB_GENERIC_BUFFERS_SIZE]
Buffer registers.
@ L4_UTCB_GENERIC_BUFFERS_SIZE
Total number of buffer registers (BRs) available.
l4_timeout_s l4_timeout_abs(l4_kernel_clock_t pint, int br) L4_NOTHROW
Set an absolute timeout.