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 90 while (__sync_lock_test_and_set (&h->
lock, 1))
113 return ((
void *) oldheap);
121 #define foreach_ssvm_api_error \ 122 _(NO_NAME, "No shared segment name", -10) \ 123 _(NO_SIZE, "Size not set (master)", -11) \ 124 _(CREATE_FAILURE, "Create failed", -12) \ 125 _(SET_SIZE, "Set size failed", -13) \ 126 _(MMAP, "mmap failed", -14) \ 127 _(SLAVE_TIMEOUT, "Slave map timeout", -15) 130 #define _(n,s,c) SSVM_API_ERROR_##n = c, 135 #define SSVM_API_ERROR_NO_NAME (-10)
int ssvm_master_init(ssvm_private_t *ssvm, u32 master_index)
int ssvm_slave_init(ssvm_private_t *ssvm, int timeout_in_seconds)
ssvm_shared_header_t * sh
always_inline void ssvm_unlock(ssvm_shared_header_t *h)
always_inline void ssvm_lock(ssvm_shared_header_t *h, u32 my_pid, u32 tag)
static void * ssvm_push_heap(ssvm_shared_header_t *sh)
static void ssvm_pop_heap(void *oldheap)
#define foreach_ssvm_api_error
u32 per_interface_next_index
always_inline void * clib_mem_set_heap(void *heap)
#define CLIB_MEMORY_BARRIER()
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".