Go to the source code of this file.
|
svm_fifo_t * | svm_fifo_create (u32 data_size_in_bytes) |
| create an svm fifo, in the current heap. More...
|
|
static ooo_segment_t * | ooo_segment_new (svm_fifo_t *f, u32 start, u32 length) |
|
static void | ooo_segment_del (svm_fifo_t *f, u32 index) |
|
static void | ooo_segment_add (svm_fifo_t *f, u32 offset, u32 length) |
| Add segment to fifo's out-of-order segment list. More...
|
|
static int | ooo_segment_try_collect (svm_fifo_t *f, u32 n_bytes_enqueued) |
| Removes segments that can now be enqueued because the fifo's tail has advanced. More...
|
|
static int | svm_fifo_enqueue_internal (svm_fifo_t *f, int pid, u32 max_bytes, u8 *copy_from_here) |
|
int | svm_fifo_enqueue_nowait (svm_fifo_t *f, int pid, u32 max_bytes, u8 *copy_from_here) |
|
static int | svm_fifo_enqueue_with_offset_internal2 (svm_fifo_t *f, int pid, u32 offset, u32 required_bytes, u8 *copy_from_here) |
| Enqueue a future segment. More...
|
|
int | svm_fifo_enqueue_with_offset (svm_fifo_t *f, int pid, u32 offset, u32 required_bytes, u8 *copy_from_here) |
|
static int | svm_fifo_dequeue_internal2 (svm_fifo_t *f, int pid, u32 max_bytes, u8 *copy_here) |
|
int | svm_fifo_dequeue_nowait (svm_fifo_t *f, int pid, u32 max_bytes, u8 *copy_here) |
|
int | svm_fifo_peek (svm_fifo_t *f, int pid, u32 offset, u32 max_bytes, u8 *copy_here) |
|
int | svm_fifo_dequeue_drop (svm_fifo_t *f, int pid, u32 max_bytes) |
|
Add segment to fifo's out-of-order segment list.
Takes care of merging adjacent segments and removing overlapping ones.
Definition at line 103 of file svm_fifo.c.
static int ooo_segment_try_collect |
( |
svm_fifo_t * |
f, |
|
|
u32 |
n_bytes_enqueued |
|
) |
| |
|
static |
Removes segments that can now be enqueued because the fifo's tail has advanced.
Returns the number of bytes added to tail.
Definition at line 253 of file svm_fifo.c.
create an svm fifo, in the current heap.
Fails vs blow up the process
Definition at line 20 of file svm_fifo.c.
int svm_fifo_dequeue_drop |
( |
svm_fifo_t * |
f, |
|
|
int |
pid, |
|
|
u32 |
max_bytes |
|
) |
| |
static int svm_fifo_dequeue_internal2 |
( |
svm_fifo_t * |
f, |
|
|
int |
pid, |
|
|
u32 |
max_bytes, |
|
|
u8 * |
copy_here |
|
) |
| |
|
static |
int svm_fifo_dequeue_nowait |
( |
svm_fifo_t * |
f, |
|
|
int |
pid, |
|
|
u32 |
max_bytes, |
|
|
u8 * |
copy_here |
|
) |
| |
static int svm_fifo_enqueue_internal |
( |
svm_fifo_t * |
f, |
|
|
int |
pid, |
|
|
u32 |
max_bytes, |
|
|
u8 * |
copy_from_here |
|
) |
| |
|
static |
int svm_fifo_enqueue_nowait |
( |
svm_fifo_t * |
f, |
|
|
int |
pid, |
|
|
u32 |
max_bytes, |
|
|
u8 * |
copy_from_here |
|
) |
| |
int svm_fifo_enqueue_with_offset |
( |
svm_fifo_t * |
f, |
|
|
int |
pid, |
|
|
u32 |
offset, |
|
|
u32 |
required_bytes, |
|
|
u8 * |
copy_from_here |
|
) |
| |
static int svm_fifo_enqueue_with_offset_internal2 |
( |
svm_fifo_t * |
f, |
|
|
int |
pid, |
|
|
u32 |
offset, |
|
|
u32 |
required_bytes, |
|
|
u8 * |
copy_from_here |
|
) |
| |
|
static |
Enqueue a future segment.
Two choices: either copies the entire segment, or copies nothing Returns 0 of the entire segment was copied Returns -1 if none of the segment was copied due to lack of space
Definition at line 372 of file svm_fifo.c.