14#ifndef L4_SYS_TIMEOUT_H__
15#define L4_SYS_TIMEOUT_H__
17#include <l4/sys/l4int.h>
73#define L4_IPC_TIMEOUT_0 ((l4_timeout_s){0x0400})
74#define L4_IPC_TIMEOUT_NEVER ((l4_timeout_s){0})
75#define L4_IPC_NEVER_INITIALIZER {0}
76#define L4_IPC_NEVER ((l4_timeout_t){0})
77#define L4_IPC_RECV_TIMEOUT_0 ((l4_timeout_t){0x00000400})
78#define L4_IPC_SEND_TIMEOUT_0 ((l4_timeout_t){0x04000000})
79#define L4_IPC_BOTH_TIMEOUT_0 ((l4_timeout_t){0x04000400})
85#define L4_TIMEOUT_US_NEVER (~0ULL)
91#define L4_TIMEOUT_US_MAX ((1ULL << 41) - 1)
119 unsigned rcv_man,
unsigned rcv_exp)
L4_NOTHROW;
204 unsigned rcv_man,
unsigned rcv_exp)
L4_NOTHROW
206 l4_uint16_t snd = (snd_man & 0x3ff) | ((snd_exp << 10) & 0x7c00);
207 l4_uint16_t rcv = (rcv_man & 0x3ff) | ((rcv_exp << 10) & 0x7c00);
252 return to.
t & 0x8000;
278 int e = (63 - __builtin_clzll(us)) - 9;
L4 compiler related defines.
l4_uint64_t l4_kernel_clock_t
Kernel clock type.
unsigned int l4_uint32_t
Unsigned 32bit value.
unsigned short int l4_uint16_t
Unsigned 16bit value.
unsigned long long l4_uint64_t
Unsigned 64bit value.
L4_CONSTEXPR l4_timeout_s l4_timeout_rel(unsigned man, unsigned exp) L4_NOTHROW
Get relative timeout consisting of mantissa and exponent.
#define L4_IPC_TIMEOUT_NEVER
never timeout
L4_CONSTEXPR void l4_rcv_timeout(l4_timeout_s rcv, l4_timeout_t *to) L4_NOTHROW
Set receive timeout in given to timeout.
L4_CONSTEXPR l4_kernel_clock_t l4_timeout_get(l4_kernel_clock_t cur, l4_timeout_s to) L4_NOTHROW
Get clock value for a clock + a timeout.
#define L4_IPC_TIMEOUT_0
Timeout constants.
#define L4_TIMEOUT_US_NEVER
The waiting period in microseconds which is interpreted as "never" by l4_timeout_from_us().
L4_CONSTEXPR l4_timeout_t l4_ipc_timeout(unsigned snd_man, unsigned snd_exp, unsigned rcv_man, unsigned rcv_exp) L4_NOTHROW
Convert explicit timeout values to l4_timeout_t type.
L4_CONSTEXPR l4_timeout_t l4_timeout(l4_timeout_s snd, l4_timeout_s rcv) L4_NOTHROW
Combine send and receive timeout in a timeout.
L4_CONSTEXPR void l4_snd_timeout(l4_timeout_s snd, l4_timeout_t *to) L4_NOTHROW
Set send timeout in given to timeout.
#define L4_TIMEOUT_US_MAX
The longest waiting period in microseconds accepted by l4_timeout_from_us().
L4_CONSTEXPR unsigned l4_timeout_is_absolute(l4_timeout_s to) L4_NOTHROW
Return whether the given timeout is absolute or not.
L4_CONSTEXPR l4_kernel_clock_t l4_timeout_rel_get(l4_timeout_s to) L4_NOTHROW
Get clock value of out timeout.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
#define L4_INLINE
L4 Inline function attribute.
#define L4_CONSTEXPR
Constexpr function attribute.
Basic timeout specification.
l4_uint16_t t
timeout value
l4_timeout_s snd
send timeout
l4_timeout_s rcv
receive timeout
struct l4_timeout_t::@32 p
combined timeout