15 #ifndef __included_ssvm_fifo_segment_h__ 16 #define __included_ssvm_fifo_segment_h__ 30 #define FIFO_SEGMENT_MIN_FIFO_SIZE 4096 31 #define FIFO_SEGMENT_MAX_FIFO_SIZE (8<<20) 32 #define FIFO_SEGMENT_ALLOC_CHUNK_SIZE 32 34 #define FIFO_SEGMENT_F_IS_PRIVATE 1 << 0 35 #define FIFO_SEGMENT_F_IS_MAIN_HEAP 1 << 1 36 #define FIFO_SEGMENT_F_IS_PREALLOCATED 1 << 2 88 return fifo_segment->
h->
fifos != 0;
94 return fifo_segment->
h->
fifos;
97 #define foreach_ssvm_fifo_segment_api_error \ 98 _(OUT_OF_SPACE, "Out of space in segment", -200) 102 #define _(n,s,c) SSVM_FIFO_SEGMENT_API_ERROR_##n = c, 114 u32 data_size_in_bytes,
123 fifo_segment,
u32 fifo_size_in_bytes);
ssvm_fifo_segment_api_error_enum_t
u32 private_segment_count
svm_fifo_segment_freelist_t
svm_fifo_segment_private_t * svm_fifo_segment_segments_pool(void)
Retrieve svm segments pool.
struct _svm_fifo svm_fifo_t
u32 svm_fifo_segment_index(svm_fifo_segment_private_t *s)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
format_function_t format_svm_fifo_segment
void svm_fifo_segment_delete(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, svm_fifo_segment_freelist_t index)
static svm_fifo_t * svm_fifo_segment_get_fifo_list(svm_fifo_segment_private_t *fifo_segment)
svm_fifo_segment_main_t svm_fifo_segment_main
svm_fifo_segment_header_t * h
#define foreach_ssvm_fifo_segment_api_error
int svm_fifo_segment_create(svm_fifo_segment_create_args_t *a)
(master) create an svm fifo segment
static u8 svm_fifo_segment_has_fifos(svm_fifo_segment_private_t *fifo_segment)
void svm_fifo_segment_free_fifo(svm_fifo_segment_private_t *s, svm_fifo_t *f, svm_fifo_segment_freelist_t index)
u32 * new_segment_indices
static svm_fifo_segment_private_t * svm_fifo_segment_get_segment(u32 segment_index)
int svm_fifo_segment_create_process_private(svm_fifo_segment_create_args_t *a)
Create an svm fifo segment in process-private memory.
u32 svm_fifo_segment_num_free_fifos(svm_fifo_segment_private_t *fifo_segment, u32 fifo_size_in_bytes)
void svm_fifo_segment_init(u64 baseva, u32 timeout_in_seconds)
int svm_fifo_segment_attach(svm_fifo_segment_create_args_t *a)
(slave) attach to an svm fifo segment
svm_fifo_segment_private_t * segments
pool of segments
u32 svm_fifo_segment_num_fifos(svm_fifo_segment_private_t *fifo_segment)
Get number of active fifos.
u32 preallocated_fifo_pairs