L4Re - L4 Runtime Environment
+ Collaboration diagram for Signals:

Modules

 Consumer
 
 Producer
 

Functions

long l4shmc_add_signal (l4shmc_area_t *shmarea, const char *signal_name, l4shmc_signal_t *signal)
 Add a signal for the shared memory area. More...
 
long l4shmc_attach_signal (l4shmc_area_t *shmarea, const char *signal_name, l4_cap_idx_t thread, l4shmc_signal_t *signal)
 Attach to signal. More...
 
long l4shmc_attach_signal_to (l4shmc_area_t *shmarea, const char *signal_name, l4_cap_idx_t thread, l4_umword_t timeout_ms, l4shmc_signal_t *signal)
 Attach to signal, with timeout. More...
 
long l4shmc_get_signal_to (l4shmc_area_t *shmarea, const char *signal_name, l4_umword_t timeout_ms, l4shmc_signal_t *signal)
 Get signal object from the shared memory area. More...
 
l4_cap_idx_t l4shmc_signal_cap (l4shmc_signal_t *signal)
 Get the signal capability of a signal. More...
 
long l4shmc_check_magic (l4shmc_chunk_t *chunk)
 Check magic value of a chunk. More...
 

Detailed Description

Function Documentation

◆ l4shmc_add_signal()

long l4shmc_add_signal ( l4shmc_area_t *  shmarea,
const char *  signal_name,
l4shmc_signal_t *  signal 
)

Add a signal for the shared memory area.

Parameters
shmareaThe shared memory area to put the chunk in.
signal_nameName of the signal.
[out]signalSignal structure to fill in.
Return values
0Success.
<0Error.
Examples:
examples/libs/shmc/prodcons.c.

◆ l4shmc_attach_signal()

long l4shmc_attach_signal ( l4shmc_area_t *  shmarea,
const char *  signal_name,
l4_cap_idx_t  thread,
l4shmc_signal_t *  signal 
)
inline

Attach to signal.

Parameters
shmareaShared memory area.
signal_nameName of the signal.
threadThread capability index to attach the signal to.
[out]signalSignal data structure to fill.
Return values
0Success.
<0Error.

◆ l4shmc_attach_signal_to()

long l4shmc_attach_signal_to ( l4shmc_area_t *  shmarea,
const char *  signal_name,
l4_cap_idx_t  thread,
l4_umword_t  timeout_ms,
l4shmc_signal_t *  signal 
)

Attach to signal, with timeout.

Parameters
shmareaShared memory area.
signal_nameName of the signal.
threadThread capability index to attach the signal to.
timeout_msTimeout in milliseconds to wait for the chunk to appear in the shared memory area.
[out]signalSignal data structure to fill.
Return values
0Success.
<0Error.
Examples:
examples/libs/shmc/prodcons.c.

◆ l4shmc_check_magic()

long l4shmc_check_magic ( l4shmc_chunk_t *  chunk)
inline

Check magic value of a chunk.

Parameters
chunkChunk.
Return values
0Magic value is not valid.
>0Chunk is ok, the magic value is valid.

◆ l4shmc_get_signal_to()

long l4shmc_get_signal_to ( l4shmc_area_t *  shmarea,
const char *  signal_name,
l4_umword_t  timeout_ms,
l4shmc_signal_t *  signal 
)

Get signal object from the shared memory area.

Parameters
shmareaShared memory area.
signal_nameName of the signal.
timeout_msTimeout in milliseconds to wait for signal of a chunk to appear in the shared memory area.
[out]signalSignal data structure to fill.
Return values
0Success.
<0Error.

◆ l4shmc_signal_cap()

l4_cap_idx_t l4shmc_signal_cap ( l4shmc_signal_t *  signal)
inline

Get the signal capability of a signal.

Parameters
signalSignal.
Returns
Capability of the signal object.