33 memset (s, 0,
sizeof (*s));
57 memset (fsh, 0,
sizeof (*fsh));
64 _vec_len (fsh->
fifos) = 0;
86 memset (s, 0,
sizeof (*s));
120 u32 data_size_in_bytes)
159 if (fsh->
fifos[i] == f)
165 clib_warning (
"fifo 0x%llx not found in fifo table...", f);
184 return s - svm_fifo_segment_main.
segments;
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
sll srl srl sll sra u16x4 i
int ssvm_master_init(ssvm_private_t *ssvm, u32 master_index)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
ssvm_shared_header_t * sh
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
void ssvm_delete(ssvm_private_t *ssvm)
svm_fifo_segment_main_t svm_fifo_segment_main
static void * ssvm_push_heap(ssvm_shared_header_t *sh)
static void ssvm_pop_heap(void *oldheap)
#define pool_put(P, E)
Free an object E in pool P.
int ssvm_slave_init(ssvm_private_t *ssvm, int timeout_in_seconds)
void svm_fifo_segment_init(u64 baseva, u32 timeout_in_seconds)
svm_fifo_segment_header_t * h
u32 svm_fifo_segment_index(svm_fifo_segment_private_t *s)
svm_fifo_t * svm_fifo_segment_alloc_fifo(svm_fifo_segment_private_t *s, u32 data_size_in_bytes)
#define clib_warning(format, args...)
#define vec_delete(V, N, M)
Delete N elements starting at element M.
static void clib_mem_free(void *p)
static void * clib_mem_alloc(uword size)
int svm_fifo_segment_create(svm_fifo_segment_create_args_t *a)
(master) create an svm fifo segment
void svm_fifo_segment_free_fifo(svm_fifo_segment_private_t *s, svm_fifo_t *f)
svm_fifo_segment_private_t * segments
pool of segments
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
int svm_fifo_segment_attach(svm_fifo_segment_create_args_t *a)
(slave) attach to an svm fifo segment
void svm_fifo_segment_delete(svm_fifo_segment_private_t *s)
svm_fifo_t * svm_fifo_create(u32 data_size_in_bytes)
create an svm fifo, in the current heap.