Loading...
Searching...
No Matches
Timeouts
Base API » Object Invocation

All kinds of timeouts and time related functions. More...

Collaboration diagram for Timeouts:

## Data Structures

struct | l4_timeout_s
| Basic timeout specification. More...
union | l4_timeout_t
| Timeout pair. More...

## Macros

#define | L4_IPC_TIMEOUT_0 ((l4_timeout_s){0x0400})
| Timeout constants.
#define | L4_IPC_TIMEOUT_NEVER ((l4_timeout_s){0})
| never timeout
#define | L4_IPC_NEVER_INITIALIZER {0}
| never timeout, initializer
#define | L4_IPC_NEVER ((l4_timeout_t){0})
| never timeout
#define | L4_IPC_RECV_TIMEOUT_0 ((l4_timeout_t){0x00000400})
| 0 receive timeout
#define | L4_IPC_SEND_TIMEOUT_0 ((l4_timeout_t){0x04000000})
| 0 send timeout
#define | L4_IPC_BOTH_TIMEOUT_0 ((l4_timeout_t){0x04000400})
| 0 receive and send timeout
#define | L4_TIMEOUT_US_NEVER (~0ULL)
| The waiting period in microseconds which is interpreted as "never" by l4_timeout_from_us().
#define | L4_TIMEOUT_US_MAX ((1ULL << 41) - 1)
| The longest waiting period in microseconds accepted by l4_timeout_from_us().

## Typedefs

typedef struct l4_timeout_s | l4_timeout_s
| Basic timeout specification.
typedef union l4_timeout_t | l4_timeout_t
| Timeout pair.

## Functions

L4_CONSTEXPR l4_timeout_s | l4_timeout_rel (unsigned man, unsigned exp) L4_NOTHROW
| Get relative timeout consisting of mantissa and exponent.
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.
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_rel_get (l4_timeout_s to) L4_NOTHROW
| Get clock value of out timeout.
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_get (l4_kernel_clock_t cur, l4_timeout_s to) L4_NOTHROW
| Get clock value for a clock + a timeout.
l4_timeout_s | l4_timeout_abs (l4_kernel_clock_t pint, int br) L4_NOTHROW
| Set an absolute timeout.
unsigned | l4_utcb_mr64_idx (unsigned idx) L4_NOTHROW
| Get index into 64bit message registers alias from native-sized index.

## Detailed Description

All kinds of timeouts and time related functions.

## Macro Definition Documentation

## L4_IPC_TIMEOUT_0

#define L4_IPC_TIMEOUT_0 ((l4_timeout_s){0x0400})

Timeout constants.

0 timeout

Definition at line 73 of file __timeout.h.

Referenced by L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::timeout().

## L4_TIMEOUT_US_MAX

#define L4_TIMEOUT_US_MAX ((1ULL << 41) - 1)

The longest waiting period in microseconds accepted by l4_timeout_from_us().

See l4_timeout_from_us() for an explanation.

Definition at line 91 of file __timeout.h.

## Typedef Documentation

## l4_timeout_s

typedef struct l4_timeout_s l4_timeout_s

Basic timeout specification.

If bit 15 == 0, basically a floating point number with 10 bits mantissa and 5 bits exponent (t = m*2^e).

If the mantissa is zero, the exponent encodes special values, see L4_IPC_TIMEOUT_0 and L4_IPC_TIMEOUT_NEVER.

If bit 15 == 1 the timeout is absolute and the lower 6 bits encode the index of the UTCB buffer register(s) holding the absolute 64-bit timeout value. On 32-bit systems, two consecutive UTCB buffer registers are used.

## l4_timeout_t

typedef union l4_timeout_t l4_timeout_t

Timeout pair.

For IPC there are usually a send and a receive timeout. So this structure contains a pair of timeouts.

## Function Documentation

## l4_ipc_timeout()

L4_CONSTEXPR l4_timeout_t l4_ipc_timeout | ( | unsigned | snd_man,
|  | unsigned | snd_exp,
|  | unsigned | rcv_man,
|  | unsigned | rcv_exp )

inline

Convert explicit timeout values to l4_timeout_t type.

Parameters

  snd_man | Mantissa of send timeout.
  snd_exp | Exponent of send timeout.
  rcv_man | Mantissa of receive timeout.
  rcv_exp | Exponent of receive timeout.

Definition at line 203 of file __timeout.h.

References L4_NOTHROW, and l4_timeout().

Here is the call graph for this function:

## l4_rcv_timeout()

L4_CONSTEXPR void l4_rcv_timeout | ( | l4_timeout_s | rcv,
|  | l4_timeout_t * | to )

inline

Set receive timeout in given to timeout.

Parameters

  | rcv | Receive timeout
  [out] | to | L4 timeout

Definition at line 227 of file __timeout.h.

References L4_NOTHROW.

## l4_snd_timeout()

L4_CONSTEXPR void l4_snd_timeout | ( | l4_timeout_s | snd,
|  | l4_timeout_t * | to )

inline

Set send timeout in given to timeout.

Parameters

  | snd | Send timeout
  [out] | to | L4 timeout

Definition at line 220 of file __timeout.h.

References L4_NOTHROW.

## l4_timeout()

L4_CONSTEXPR l4_timeout_t l4_timeout | ( | l4_timeout_s | snd,
|  | l4_timeout_s | rcv )

inline

Combine send and receive timeout in a timeout.

Parameters

  snd | Send timeout
  rcv | Receive timeout

Returns
  L4 timeout

Definition at line 213 of file __timeout.h.

References L4_NOTHROW.

Referenced by l4_ipc_sleep_ms(), l4_ipc_sleep_us(), l4_ipc_timeout(), and L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::timeout().

Here is the caller graph for this function:

## l4_timeout_abs()

l4_timeout_s l4_timeout_abs | ( | l4_kernel_clock_t | pint,
|  | int | br )

inline

Set an absolute timeout.

Parameters

  pint | Point in time in clocks
  br | The buffer register the timeout shall be placed in. (

Note
  On 32bit architectures the timeout needs two consecutive buffers.)
  The absolute timeout value will be placed into the buffer register br of the current thread.

Returns
  timeout value

Definition at line 389 of file utcb.h.

References L4_NOTHROW, and l4_utcb().

Referenced by L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::timeout().

Here is the call graph for this function:
Here is the caller graph for this function:

## l4_timeout_get()

L4_CONSTEXPR l4_kernel_clock_t l4_timeout_get | ( | l4_kernel_clock_t | cur,
|  | l4_timeout_s | to )

inline

Get clock value for a clock + a timeout.

Parameters

  cur | Clock value
  to | L4 timeout

Returns
  Clock sum

Definition at line 257 of file __timeout.h.

References L4_NOTHROW, l4_timeout_is_absolute(), and l4_timeout_rel_get().

Here is the call graph for this function:

## l4_timeout_is_absolute()

L4_CONSTEXPR unsigned l4_timeout_is_absolute | ( | l4_timeout_s | to | ) |

inline

Return whether the given timeout is absolute or not.

Parameters

  to | L4 timeout

Returns
  != 0 if absolute, 0 if relative

Definition at line 250 of file __timeout.h.

References L4_NOTHROW.

Referenced by l4_timeout_get().

Here is the caller graph for this function:

## l4_timeout_rel()

L4_CONSTEXPR l4_timeout_s l4_timeout_rel | ( | unsigned | man,
|  | unsigned | exp )

inline

Get relative timeout consisting of mantissa and exponent.

Parameters

  man | Mantissa of timeout
  exp | Exponent of timeout

Returns
  timeout value

Definition at line 234 of file __timeout.h.

References L4_NOTHROW.

## l4_timeout_rel_get()

L4_CONSTEXPR l4_kernel_clock_t l4_timeout_rel_get | ( | l4_timeout_s | to | ) |

inline

Get clock value of out timeout.

Parameters

  to | L4 timeout

Returns
  Clock value

Definition at line 241 of file __timeout.h.

References L4_NOTHROW.

Referenced by l4_timeout_get().

Here is the caller graph for this function:

## l4_utcb_mr64_idx()

unsigned l4_utcb_mr64_idx | ( | unsigned | idx | ) |

inline

Get index into 64bit message registers alias from native-sized index.

Parameters

  idx | Index to native-sized message register

Returns
  Index to 64bit message register alias

Definition at line 392 of file utcb.h.

References L4_INLINE, and L4_NOTHROW.

Referenced by l4_icu_msi_info_u().

Here is the caller graph for this function: