Loading...
Searching...
No Matches
Consumer
Shared Memory Library » Signals
Collaboration diagram for Consumer:

## Functions

long | l4shmc_enable_signal (l4shmc_signal_t *signal)
| Enable a signal.
long | l4shmc_wait_any (l4shmc_signal_t **retsignal)
| Wait on any signal.
long | l4shmc_wait_any_try (l4shmc_signal_t **retsignal)
| Check whether any waited signal has an event pending.
long | l4shmc_wait_any_to (l4_timeout_t timeout, l4shmc_signal_t **retsignal)
| Wait for any signal with timeout.
long | l4shmc_wait_signal (l4shmc_signal_t *signal)
| Wait on a specific signal.
long | l4shmc_wait_signal_to (l4shmc_signal_t *signal, l4_timeout_t timeout)
| Wait on a specific signal, with timeout.
long | l4shmc_wait_signal_try (l4shmc_signal_t *signal)
| Check whether a specific signal has an event pending.

## Detailed Description

## Function Documentation

## l4shmc_enable_signal()

long l4shmc_enable_signal | ( | l4shmc_signal_t * | signal | ) |

Enable a signal.

Parameters

  signal | Signal to enable.

Return values

  0 | Success.
  <0 | Error.

A signal must be enabled before waiting when the consumer waits on any signal. Enabling is not needed if the consumer waits for a specific signal or chunk.

References L4_CV.

## l4shmc_wait_any()

long l4shmc_wait_any | ( | l4shmc_signal_t ** | retsignal | ) |

inline

Wait on any signal.

Parameters

  [out] | retsignal | Signal received.

Return values

  0 | Success.
  <0 | Error.

References L4_CV, and L4_INLINE.

## l4shmc_wait_any_to()

long l4shmc_wait_any_to | ( | l4_timeout_t | timeout,
|  | l4shmc_signal_t ** | retsignal )

Wait for any signal with timeout.

Parameters

  | timeout | Timeout.
  [out] | retsignal | Signal that has the event pending if any.

Return values

  0 | Success.
  <0 | Error.

The return code indicates whether an event was pending or not. Success means an event was pending, if an receive timeout error is returned no event was pending.

References L4_CV, and L4_INLINE.

## l4shmc_wait_any_try()

long l4shmc_wait_any_try | ( | l4shmc_signal_t ** | retsignal | ) |

inline

Check whether any waited signal has an event pending.

Parameters

  [out] | retsignal | Signal that has the event pending if any.

Return values

  0 | Success.
  <0 | Error.

The return code indicates whether an event was pending or not. Success means an event was pending, if an receive timeout error is returned no event was pending.

References L4_CV.

## l4shmc_wait_signal()

long l4shmc_wait_signal | ( | l4shmc_signal_t * | signal | ) |

inline

Wait on a specific signal.

Parameters

  signal | Signal to wait for.

Return values

  0 | Success.
  <0 | Error.

Examples
  examples/libs/shmc/prodcons.c.

References L4_CV.

## l4shmc_wait_signal_to()

long l4shmc_wait_signal_to | ( | l4shmc_signal_t * | signal,
|  | l4_timeout_t | timeout )

Wait on a specific signal, with timeout.

Parameters

  signal | Signal to wait for.
  timeout | Timeout.

Return values

  0 | Success.
  <0 | Error.

References L4_CV, and L4_INLINE.

## l4shmc_wait_signal_try()

long l4shmc_wait_signal_try | ( | l4shmc_signal_t * | signal | ) |

inline

Check whether a specific signal has an event pending.

Parameters

  signal | Signal to check.

Return values

  0 | Success.
  <0 | Error.

The return code indicates whether an event was pending or not. Success means an event was pending, if an receive timeout error is returned no event was pending.

References L4_CV, and L4_INLINE.