15 #ifndef __included_ssvm_fifo_h__ 16 #define __included_ssvm_fifo_h__ 43 #define OOO_SEGMENT_INVALID_INDEX ((u32)~0) 77 pthread_mutex_lock (&f->
mutex);
80 if (pthread_mutex_trylock (&f->
mutex))
94 pthread_mutex_unlock (&f->
mutex);
118 u8 * copy_from_here);
122 u8 * copy_from_here);
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
int svm_fifo_dequeue_drop(svm_fifo_t *f, int pid, u32 max_bytes)
static u8 svm_fifo_has_ooo_data(svm_fifo_t *f)
Fixed length block allocator.
u32 prev
Previous linked-list element pool index.
static void svm_fifo_unlock(svm_fifo_t *f)
static u32 svm_fifo_max_enqueue(svm_fifo_t *f)
svm_fifo_t * svm_fifo_create(u32 data_size_in_bytes)
create an svm fifo, in the current heap.
static u32 ooo_segment_end_offset(svm_fifo_t *f, ooo_segment_t *s)
static u32 svm_fifo_max_dequeue(svm_fifo_t *f)
u32 ooos_newest
Last segment to have been updated.
ooo_segment_t * ooo_segments
Pool of ooo segments.
int svm_fifo_peek(svm_fifo_t *f, int pid, u32 offset, u32 max_bytes, u8 *copy_here)
int svm_fifo_enqueue_nowait(svm_fifo_t *f, int pid, u32 max_bytes, u8 *copy_from_here)
static u32 ooo_segment_offset(svm_fifo_t *f, ooo_segment_t *s)
static ooo_segment_t * svm_fifo_newest_ooo_segment(svm_fifo_t *f)
#define OOO_SEGMENT_INVALID_INDEX
int svm_fifo_dequeue_nowait(svm_fifo_t *f, int pid, u32 max_bytes, u8 *copy_here)
u32 fifo_position
Start of segment, normalized.
u32 ooos_list_head
Head of out-of-order linked-list.
u32 length
Length of segment.
u32 next
Next linked-list element pool index.
template key/value backing page structure
#define CLIB_MEMORY_BARRIER()
static int svm_fifo_lock(svm_fifo_t *f, u32 pid, u32 tag, int nowait)
int svm_fifo_enqueue_with_offset(svm_fifo_t *f, int pid, u32 offset, u32 required_bytes, u8 *copy_from_here)
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".