15 #ifndef __included_ssvm_h__ 16 #define __included_ssvm_h__ 20 #include <sys/types.h> 23 #include <netinet/in.h> 42 #define MMAP_PAGESIZE (clib_mem_get_page_size()) 45 #define SSVM_N_OPAQUE 7 147 return ((
void *) oldheap);
168 #define foreach_ssvm_api_error \ 169 _(NO_NAME, "No shared segment name", -100) \ 170 _(NO_SIZE, "Size not set (server)", -101) \ 171 _(CREATE_FAILURE, "Create failed", -102) \ 172 _(SET_SIZE, "Set size failed", -103) \ 173 _(MMAP, "mmap failed", -104) \ 174 _(CLIENT_TIMEOUT, "Client map timeout", -105) 178 #define _(n,s,c) SSVM_API_ERROR_##n = c, 183 #define SSVM_API_ERROR_NO_NAME (-10)
int ssvm_client_init_memfd(ssvm_private_t *memfd)
Initialize memfd segment client.
Optimized string handling code, including c11-compliant "safe C library" variants.
Fixed length block allocator.
static clib_mem_heap_t * clib_mem_set_heap(clib_mem_heap_t *heap)
int ssvm_client_init(ssvm_private_t *ssvm, ssvm_segment_type_t type)
ssvm_shared_header_t * sh
int ssvm_client_init_shm(ssvm_private_t *ssvm)
enum ssvm_segment_type_ ssvm_segment_type_t
int ssvm_server_init_private(ssvm_private_t *ssvm)
Initialize segment in a private heap.
static void * ssvm_push_heap(ssvm_shared_header_t *sh)
int attach_timeout
shm segments attach timeout (sec)
static void ssvm_pop_heap(void *oldheap)
#define clib_atomic_test_and_set(a)
void ssvm_delete_private(ssvm_private_t *ssvm)
vl_api_fib_path_type_t type
#define foreach_ssvm_api_error
static void ssvm_unlock(ssvm_shared_header_t *h)
static void * ssvm_mem_alloc(ssvm_private_t *ssvm, uword size)
#define clib_atomic_release(a)
ssvm_segment_type_t ssvm_type(const ssvm_private_t *ssvm)
u8 numa
UNUSED: numa requested at alloc time.
void ssvm_delete_shm(ssvm_private_t *ssvm)
void ssvm_delete_memfd(ssvm_private_t *memfd)
Bitmaps built as vectors of machine words.
static void * clib_mem_alloc(uword size)
void ssvm_delete(ssvm_private_t *ssvm)
u8 * ssvm_name(const ssvm_private_t *ssvm)
int ssvm_server_init_memfd(ssvm_private_t *memfd)
Initialize memfd segment server.
int ssvm_server_init_shm(ssvm_private_t *ssvm)
static void ssvm_unlock_non_recursive(ssvm_shared_header_t *h)
int ssvm_server_init(ssvm_private_t *ssvm, ssvm_segment_type_t type)
static void ssvm_lock(ssvm_shared_header_t *h, u32 my_pid, u32 tag)
static void ssvm_lock_non_recursive(ssvm_shared_header_t *h, u32 tag)
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".
int ssvm_client_init_private(ssvm_private_t *ssvm)