summaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
Diffstat (limited to 'src/svm')
-rw-r--r--src/svm/svm_fifo.c7
-rw-r--r--src/svm/svm_fifo.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c
index 10c319236ee..47df22547ac 100644
--- a/src/svm/svm_fifo.c
+++ b/src/svm/svm_fifo.c
@@ -828,6 +828,13 @@ svm_fifo_dequeue_drop (svm_fifo_t * f, u32 max_bytes)
return total_drop_bytes;
}
+void
+svm_fifo_dequeue_drop_all (svm_fifo_t * f)
+{
+ f->head = f->tail;
+ __sync_fetch_and_sub (&f->cursize, f->cursize);
+}
+
u32
svm_fifo_number_ooo_segments (svm_fifo_t * f)
{
diff --git a/src/svm/svm_fifo.h b/src/svm/svm_fifo.h
index 39cdcc06a0c..90a49c03fc1 100644
--- a/src/svm/svm_fifo.h
+++ b/src/svm/svm_fifo.h
@@ -152,6 +152,7 @@ int svm_fifo_dequeue_nowait (svm_fifo_t * f, u32 max_bytes, u8 * copy_here);
int svm_fifo_peek (svm_fifo_t * f, u32 offset, u32 max_bytes, u8 * copy_here);
int svm_fifo_dequeue_drop (svm_fifo_t * f, u32 max_bytes);
+void svm_fifo_dequeue_drop_all (svm_fifo_t * f);
u32 svm_fifo_number_ooo_segments (svm_fifo_t * f);
ooo_segment_t *svm_fifo_first_ooo_segment (svm_fifo_t * f);
void svm_fifo_init_pointers (svm_fifo_t * f, u32 pointer);