15 #ifndef __included_ssvm_h__ 16 #define __included_ssvm_h__ 20 #include <sys/types.h> 23 #include <netinet/in.h> 41 #define MMAP_PAGESIZE (4<<10) 42 #define SSVM_N_OPAQUE 7 93 while (__sync_lock_test_and_set (&h->
lock, 1))
118 return ((
void *) oldheap);
127 #define foreach_ssvm_api_error \ 128 _(NO_NAME, "No shared segment name", -10) \ 129 _(NO_SIZE, "Size not set (master)", -11) \ 130 _(CREATE_FAILURE, "Create failed", -12) \ 131 _(SET_SIZE, "Set size failed", -13) \ 132 _(MMAP, "mmap failed", -14) \ 133 _(SLAVE_TIMEOUT, "Slave map timeout", -15) 137 #define _(n,s,c) SSVM_API_ERROR_##n = c, 142 #define SSVM_API_ERROR_NO_NAME (-10)
int ssvm_master_init(ssvm_private_t *ssvm, u32 master_index)
Fixed length block allocator.
int ssvm_slave_init(ssvm_private_t *ssvm, int timeout_in_seconds)
ssvm_shared_header_t * sh
static void * ssvm_push_heap(ssvm_shared_header_t *sh)
static void ssvm_pop_heap(void *oldheap)
#define foreach_ssvm_api_error
static void ssvm_unlock(ssvm_shared_header_t *h)
u32 per_interface_next_index
static void * clib_mem_set_heap(void *heap)
Bitmaps built as vectors of machine words.
#define CLIB_MEMORY_BARRIER()
static void ssvm_lock(ssvm_shared_header_t *h, u32 my_pid, u32 tag)
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".