L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
Collaboration diagram for Producer:

Functions

long l4shmc_chunk_try_to_take (l4shmc_chunk_t *chunk)
 Try to mark chunk busy.
long l4shmc_chunk_try_to_take_for_writing (l4shmc_chunk_t *chunk)
 Try to mark chunk busy writing.
long l4shmc_chunk_try_to_take_for_overwriting (l4shmc_chunk_t *chunk)
 Try to mark the chunk busy writing after it was ready for reading.
long l4shmc_chunk_ready (l4shmc_chunk_t *chunk, l4_umword_t size)
 Mark chunk as filled (ready).
long l4shmc_chunk_ready_sig (l4shmc_chunk_t *chunk, l4_umword_t size)
 Mark chunk as filled (ready) and signal consumer.
long l4shmc_is_chunk_clear (l4shmc_chunk_t const *chunk)
 Check whether chunk is free.

Detailed Description

Function Documentation

◆ l4shmc_chunk_ready()

long l4shmc_chunk_ready ( l4shmc_chunk_t * chunk,
l4_umword_t size )
inline

Mark chunk as filled (ready).

Parameters
chunkchunk.
sizeSize of data in the chunk, in bytes.
Return values
0Success.
<0Error.

References L4_CV, and L4_INLINE.

◆ l4shmc_chunk_ready_sig()

long l4shmc_chunk_ready_sig ( l4shmc_chunk_t * chunk,
l4_umword_t size )
inline

Mark chunk as filled (ready) and signal consumer.

Parameters
chunkchunk.
sizeSize of data in the chunk, in bytes.
Return values
0Success.
<0Error.
Examples
examples/libs/shmc/prodcons.c.

References L4_CV, and L4_INLINE.

◆ l4shmc_chunk_try_to_take()

long l4shmc_chunk_try_to_take ( l4shmc_chunk_t * chunk)
inline

Try to mark chunk busy.

Parameters
chunkchunk to mark.
Return values
0Chunk could be taken.
<0Chunk could not be taken, try again.
Examples
examples/libs/shmc/prodcons.c.

References L4_CV, and L4_INLINE.

◆ l4shmc_chunk_try_to_take_for_overwriting()

long l4shmc_chunk_try_to_take_for_overwriting ( l4shmc_chunk_t * chunk)
inline

Try to mark the chunk busy writing after it was ready for reading.

Parameters
chunkchunk to mark busy writing.

This function is used by the producer to overwrite a message if the consumer did not read the message within an expected time. This function can only be used if the consumer uses l4shmc_chunk_try_to_take_for_reading() before reading the chunk.

Return values
0Chunk could be taken and can be written.
<0Chunk could not be taken, try again.

References L4_CV, and L4_INLINE.

◆ l4shmc_chunk_try_to_take_for_writing()

long l4shmc_chunk_try_to_take_for_writing ( l4shmc_chunk_t * chunk)
inline

Try to mark chunk busy writing.

This function is actually an alias for l4shmc_chunk_try_to_take().

Parameters
chunkchunk to mark busy writing.
Return values
0Chunk could be taken and can be written.
<0Chunk could not be taken, try again.

References L4_CV, and L4_INLINE.

◆ l4shmc_is_chunk_clear()

long l4shmc_is_chunk_clear ( l4shmc_chunk_t const * chunk)
inline

Check whether chunk is free.

Parameters
chunkChunk to check.
Return values
!=0Chunk is clear.
0Chunk is not clear.

References L4_CV, and L4_INLINE.