L4Re - L4 Runtime Environment
+ Collaboration diagram for Consumer:

Functions

long l4shmc_enable_chunk (l4shmc_chunk_t *chunk)
 Enable a signal connected with a chunk. More...
 
long l4shmc_wait_chunk (l4shmc_chunk_t *chunk)
 Wait on a specific chunk. More...
 
long l4shmc_wait_chunk_to (l4shmc_chunk_t *chunk, l4_timeout_t timeout)
 Check whether a specific chunk has an event pending, with timeout. More...
 
long l4shmc_wait_chunk_try (l4shmc_chunk_t *chunk)
 Check whether a specific chunk has an event pending. More...
 
long l4shmc_chunk_consumed (l4shmc_chunk_t *chunk)
 Mark a chunk as free. More...
 
long l4shmc_is_chunk_ready (l4shmc_chunk_t *chunk)
 Check whether data is available. More...
 
long l4shmc_chunk_size (l4shmc_chunk_t *chunk)
 Get current size of a chunk. More...
 

Detailed Description

Function Documentation

◆ l4shmc_chunk_consumed()

long l4shmc_chunk_consumed ( l4shmc_chunk_t *  chunk)
inline

Mark a chunk as free.

Parameters
chunkChunk to mark as free.
Return values
0Success.
<0Error.
Examples:
examples/libs/shmc/prodcons.c.

◆ l4shmc_chunk_size()

long l4shmc_chunk_size ( l4shmc_chunk_t *  chunk)
inline

Get current size of a chunk.

Parameters
chunkChunk.
Return values
0Success.
<0Error.
Examples:
examples/libs/shmc/prodcons.c.

◆ l4shmc_enable_chunk()

long l4shmc_enable_chunk ( l4shmc_chunk_t *  chunk)

Enable a signal connected with a chunk.

Parameters
chunkChunk 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_is_chunk_ready()

long l4shmc_is_chunk_ready ( l4shmc_chunk_t *  chunk)
inline

Check whether data is available.

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

◆ l4shmc_wait_chunk()

long l4shmc_wait_chunk ( l4shmc_chunk_t *  chunk)
inline

Wait on a specific chunk.

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

◆ l4shmc_wait_chunk_to()

long l4shmc_wait_chunk_to ( l4shmc_chunk_t *  chunk,
l4_timeout_t  timeout 
)

Check whether a specific chunk has an event pending, with timeout.

Parameters
chunkChunk to check.
timeoutTimeout.
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_chunk_try()

long l4shmc_wait_chunk_try ( l4shmc_chunk_t *  chunk)
inline

Check whether a specific chunk has an event pending.

Parameters
chunkChunk 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.