L4Re - L4 Runtime Environment
shmc.h File Reference

Shared memory library header file. More...

#include <l4/sys/linkage.h>
#include <l4/sys/types.h>
#include <l4/sys/err.h>
#include <l4/shmc/types.h>
#include <l4/shmc/internal.h>
+ Include dependency graph for shmc.h:

Go to the source code of this file.

Functions

long l4shmc_create (const char *shmc_name, l4_umword_t shm_size)
 Create a shared memory area. More...
 
long l4shmc_attach (const char *shmc_name, l4shmc_area_t *shmarea)
 Attach to a shared memory area. More...
 
long l4shmc_attach_to (const char *shmc_name, l4_umword_t timeout_ms, l4shmc_area_t *shmarea)
 Attach to a shared memory area, with limited waiting. More...
 
long l4shmc_add_chunk (l4shmc_area_t *shmarea, const char *chunk_name, l4_umword_t chunk_capacity, l4shmc_chunk_t *chunk)
 Add a chunk in the shared memory area. More...
 
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_trigger (l4shmc_signal_t *signal)
 Trigger a signal. More...
 
long l4shmc_chunk_try_to_take (l4shmc_chunk_t *chunk)
 Try to mark chunk busy. More...
 
long l4shmc_chunk_ready (l4shmc_chunk_t *chunk, l4_umword_t size)
 Mark chunk as filled (ready). More...
 
long l4shmc_chunk_ready_sig (l4shmc_chunk_t *chunk, l4_umword_t size)
 Mark chunk as filled (ready) and signal consumer. More...
 
long l4shmc_get_chunk (l4shmc_area_t *shmarea, const char *chunk_name, l4shmc_chunk_t *chunk)
 Get chunk out of shared memory area. More...
 
long l4shmc_get_chunk_to (l4shmc_area_t *shmarea, const char *chunk_name, l4_umword_t timeout_ms, l4shmc_chunk_t *chunk)
 Get chunk out of shared memory area, with timeout. More...
 
long l4shmc_iterate_chunk (l4shmc_area_t *shmarea, const char **chunk_name, long offs)
 Iterate over names of all existing chunks. 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...
 
long l4shmc_enable_signal (l4shmc_signal_t *signal)
 Enable a signal. More...
 
long l4shmc_enable_chunk (l4shmc_chunk_t *chunk)
 Enable a signal connected with a chunk. 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...
 
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_connect_chunk_signal (l4shmc_chunk_t *chunk, l4shmc_signal_t *signal)
 Connect a signal with a chunk. More...
 
long l4shmc_is_chunk_ready (l4shmc_chunk_t *chunk)
 Check whether data is available. More...
 
long l4shmc_is_chunk_clear (l4shmc_chunk_t *chunk)
 Check whether chunk is free. More...
 
void * l4shmc_chunk_ptr (l4shmc_chunk_t *chunk)
 Get data pointer to chunk. More...
 
long l4shmc_chunk_size (l4shmc_chunk_t *chunk)
 Get current size of a chunk. More...
 
long l4shmc_chunk_capacity (l4shmc_chunk_t *chunk)
 Get capacity of a chunk. More...
 
l4shmc_signal_t * l4shmc_chunk_signal (l4shmc_chunk_t *chunk)
 Get the signal of a chunk. 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...
 
long l4shmc_area_size (l4shmc_area_t *shmarea)
 Get size of shared memory area. More...
 
long l4shmc_area_size_free (l4shmc_area_t *shmarea)
 Get free size of shared memory area. More...
 
long l4shmc_area_overhead (void)
 Get memory overhead per area that is not available for chunks. More...
 
long l4shmc_chunk_overhead (void)
 Get memory overhead required in addition to the chunk capacity for adding one chunk. More...
 

Detailed Description

Shared memory library header file.

Definition in file shmc.h.