function libshared_memory_init

Jump to navigation Jump to search

Source Files

└── test_and_benchmark
    └── libshared
        ├── inc
        │   └── libshared
        │       └── libshared_memory.h
        └── src
            └── libshared_memory
                └── libshared_memory_init.c

Opaque Structures

struct libshared_memory_state;


void libshared_memory_init( struct libshared_memory_state *ms );


struct libshared_memory_state *ms

A pointer to a user-allocated LFDS710_PAL_ATOMIC_ISOLATION_IN_BYTES aligned struct libshared_memory_state. Stack declared variables will automatically be correctly aligned by the compiler, due to the information in the structure definitions; nothing has to be done. Heap allocated variables however will by no means be correctly aligned and an aligned malloc must be used.


This is a single-threaded API. The initialized memory state structure can only be safely used by threads on the same logical core as the thread which called libshared_memory_init, which in practise means only that calling thread uses the struct.


See Also