about summary refs log tree commit diff
path: root/src/engine/e_ringbuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/e_ringbuffer.h')
-rw-r--r--src/engine/e_ringbuffer.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/engine/e_ringbuffer.h b/src/engine/e_ringbuffer.h
index 40043492..71b5831b 100644
--- a/src/engine/e_ringbuffer.h
+++ b/src/engine/e_ringbuffer.h
@@ -1,18 +1,16 @@
 #ifndef _RINGBUFFER_H
 #define _RINGBUFFER_H
 
-typedef struct RINGBUFFER
+typedef struct RINGBUFFER RINGBUFFER;
+
+enum
 {
-	/* what you need */
-	struct RBITEM_t *next_alloc;
-	struct RBITEM_t *last_alloc;
-	struct RBITEM_t *first;
-	struct RBITEM_t *last;
-	void *memory;
-	int size;
-} RINGBUFFER;
+	/* Will start to destroy items to try to fit the next one */
+	RINGBUF_FLAG_RECYCLE=1
+};
  
-RINGBUFFER *ringbuf_init(void *memory, int size);
+RINGBUFFER *ringbuf_init(void *memory, int size, int flags);
+void ringbuf_clear(RINGBUFFER *rb);
 void *ringbuf_allocate(RINGBUFFER *rb, int size);
 void ringbuf_validate(RINGBUFFER *rb);
 
@@ -23,4 +21,6 @@ void *ringbuf_next(RINGBUFFER *rb, void *current);
 void *ringbuf_first(RINGBUFFER *rb);
 void *ringbuf_last(RINGBUFFER *rb);
 
+void ringbuf_popfirst(RINGBUFFER *rb);
+
 #endif