L4Re - L4 Runtime Environment
+ Collaboration diagram for Consumer:

Functions

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

Detailed Description

Function Documentation

◆ l4shmc_enable_signal()

long l4shmc_enable_signal ( l4shmc_signal_t *  signal)

Enable a signal.

Parameters
signalSignal to enable.
Return values
0Success.
<0Error.

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.

◆ l4shmc_wait_any()

long l4shmc_wait_any ( l4shmc_signal_t **  retsignal)
inline

Wait on any signal.

Parameters
[out]retsignalSignal received.
Return values
0Success.
<0Error.

◆ l4shmc_wait_any_to()

long l4shmc_wait_any_to ( l4_timeout_t  timeout,
l4shmc_signal_t **  retsignal 
)

Wait for any signal with timeout.

Parameters
timeoutTimeout.
[out]retsignalSignal that has the event pending if any.
Return values
0Success.
<0Error.

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.

◆ 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]retsignalSignal that has the event pending if any.
Return values
0Success.
<0Error.

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.

◆ l4shmc_wait_signal()

long l4shmc_wait_signal ( l4shmc_signal_t *  signal)
inline

Wait on a specific signal.

Parameters
signalSignal to wait for.
Return values
0Success.
<0Error.
Examples:
examples/libs/shmc/prodcons.c.

◆ 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
signalSignal to wait for.
timeoutTimeout.
Return values
0Success.
<0Error.

◆ l4shmc_wait_signal_try()

long l4shmc_wait_signal_try ( l4shmc_signal_t *  signal)
inline

Check whether a specific signal has an event pending.

Parameters
signalSignal to check.
Return values
0Success.
<0Error.

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.