15#include <l4/sys/linkage.h>
69#define __INCLUDED_FROM_L4SHMC_H__
70#include <l4/shmc/types.h>
168 l4_umword_t chunk_capacity, l4shmc_chunk_t *chunk);
183 l4shmc_signal_t *signal);
291 l4shmc_chunk_t *chunk);
357 l4shmc_signal_t *signal);
682#include <l4/shmc/internal.h>
long l4shmc_chunk_overhead(void)
Get memory overhead required in addition to the chunk capacity for adding one chunk.
long l4shmc_area_overhead(void)
Get memory overhead per area that is not available for chunks.
long l4shmc_connect_chunk_signal(l4shmc_chunk_t *chunk, l4shmc_signal_t *signal)
Connect a signal with a chunk.
long l4shmc_mark_client_initialized(l4shmc_area_t *shmarea)
Mark this shared memory client as 'initialized'.
long l4shmc_area_size(l4shmc_area_t const *shmarea)
Get size of shared memory area.
long l4shmc_get_initialized_clients(l4shmc_area_t *shmarea, l4_umword_t *bitmask)
Fetch the _clients_init_done bitmask of the shared memory area.
long l4shmc_attach(char const *shmc_name, l4shmc_area_t *shmarea)
Attach to a shared memory area.
long l4shmc_create(char const *shmc_name)
Create a shared memory area.
long l4shmc_get_client_nr(l4shmc_area_t const *shmarea)
Determine the client number of the shared memory region.
long l4shmc_area_size_free(l4shmc_area_t const *shmarea)
Get free size of shared memory area.
long l4shmc_wait_chunk_try(l4shmc_chunk_t *chunk)
Check whether a specific chunk has an event pending.
long l4shmc_chunk_consumed(l4shmc_chunk_t *chunk)
Mark a chunk as free.
long l4shmc_is_chunk_ready(l4shmc_chunk_t const *chunk)
Check whether data is available.
long l4shmc_wait_chunk(l4shmc_chunk_t *chunk)
Wait on a specific chunk.
long l4shmc_chunk_size(l4shmc_chunk_t const *chunk)
Get current size of a chunk.
long l4shmc_wait_chunk_to(l4shmc_chunk_t *chunk, l4_timeout_t timeout)
Check whether a specific chunk has an event pending, with timeout.
long l4shmc_enable_chunk(l4shmc_chunk_t *chunk)
Enable a signal connected with a chunk.
long l4shmc_chunk_try_to_take_for_reading(l4shmc_chunk_t *chunk)
Try to mark chunk busy reading.
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.
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_try_to_take_for_writing(l4shmc_chunk_t *chunk)
Try to mark chunk busy writing.
long l4shmc_chunk_ready(l4shmc_chunk_t *chunk, l4_umword_t size)
Mark chunk as filled (ready).
long l4shmc_chunk_try_to_take(l4shmc_chunk_t *chunk)
Try to mark chunk busy.
long l4shmc_iterate_chunk(l4shmc_area_t const *shmarea, char const **chunk_name, long offs)
Iterate over names of all existing chunks.
long l4shmc_get_chunk(l4shmc_area_t *shmarea, char const *chunk_name, l4shmc_chunk_t *chunk)
Get chunk out of shared memory area.
l4shmc_signal_t * l4shmc_chunk_signal(l4shmc_chunk_t const *chunk)
Get the registered signal of a chunk.
long l4shmc_add_chunk(l4shmc_area_t *shmarea, char const *chunk_name, l4_umword_t chunk_capacity, l4shmc_chunk_t *chunk)
Add a chunk in the shared memory area.
long l4shmc_chunk_capacity(l4shmc_chunk_t const *chunk)
Get capacity of a chunk.
long l4shmc_get_chunk_to(l4shmc_area_t *shmarea, char const *chunk_name, l4_umword_t timeout_ms, l4shmc_chunk_t *chunk)
Get chunk out of shared memory area, with timeout.
void * l4shmc_chunk_ptr(l4shmc_chunk_t const *chunk)
Get data pointer to chunk.
long l4shmc_enable_signal(l4shmc_signal_t *signal)
Enable a signal.
long l4shmc_wait_signal_try(l4shmc_signal_t *signal)
Check whether a specific signal has an event pending.
long l4shmc_wait_any(l4shmc_signal_t **retsignal)
Wait on any signal.
long l4shmc_wait_signal(l4shmc_signal_t *signal)
Wait on a specific signal.
long l4shmc_wait_signal_to(l4shmc_signal_t *signal, l4_timeout_t timeout)
Wait on a specific signal, with timeout.
long l4shmc_wait_any_try(l4shmc_signal_t **retsignal)
Check whether any waited signal has an event pending.
long l4shmc_wait_any_to(l4_timeout_t timeout, l4shmc_signal_t **retsignal)
Wait for any signal with timeout.
long l4shmc_trigger(l4shmc_signal_t *signal)
Trigger a signal.
long l4shmc_attach_signal(l4shmc_area_t *shmarea, char const *signal_name, l4_cap_idx_t thread, l4shmc_signal_t *signal)
Attach to signal.
long l4shmc_get_signal(l4shmc_area_t *shmarea, char const *signal_name, l4shmc_signal_t *signal)
Get signal object from the shared memory area.
l4_cap_idx_t l4shmc_signal_cap(l4shmc_signal_t const *signal)
Get the signal capability of a signal.
long l4shmc_check_magic(l4shmc_chunk_t const *chunk)
Check magic value of a chunk.
long l4shmc_add_signal(l4shmc_area_t *shmarea, char const *signal_name, l4shmc_signal_t *signal)
Add a signal for the shared memory area.
unsigned long l4_umword_t
Unsigned machine word.
unsigned long l4_cap_idx_t
Capability selector type.
#define __END_DECLS
End section with C types and functions.
#define L4_CV
Define calling convention.
#define L4_INLINE
L4 Inline function attribute.
#define __BEGIN_DECLS
Start section with C types and functions.
Common L4 ABI Data Types.