-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmfifo.h
More file actions
34 lines (25 loc) · 961 Bytes
/
mfifo.h
File metadata and controls
34 lines (25 loc) · 961 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef __MFIFO_H__
#define __MFIFO_H__
#include <stddef.h>
struct mfifo;
const size_t mfifo_size(void);
struct mfifo *mfifo_create( void *mem
, size_t memsize
, size_t chunk_size
, size_t free_chunks_max
, void *allocator
, void *(*alloc)(void *, size_t)
, void (*dealloc)(void*,void*)
);
void mfifo_destroy( struct mfifo *);
void mfifo_shrink( struct mfifo *);
void *mfifo_add( struct mfifo *fifo );
void *mfifo_get( struct mfifo *fifo );
void mfifo_drop( struct mfifo *fifo, void *data );
void *mfifo_head( struct mfifo *fifo );
void mfifo_iter_fwd( struct mfifo *fifo, void *cc, void (*fn)(void*,void*) );
void mfifo_iter_back( struct mfifo *fifo, void *cc, void (*fn)(void*,void*) );
#ifdef MISCDATA_RT_ENABLE
void mfifo_dump_status(struct mfifo *);
#endif
#endif