forked from PAWPAW-Mirror/lib_xua
Plug in variable size queue implementation for saving buffer space in iAP.
This commit is contained in:
@@ -9,10 +9,11 @@ typedef struct queue {
|
||||
int rdptr; // Using absolute indices which count reads and writes so this needs to be considered when accessing.
|
||||
int wrptr;
|
||||
int size;
|
||||
int element_size;
|
||||
int mask;
|
||||
} queue;
|
||||
|
||||
void init_queue(REFERENCE_PARAM(queue, q), unsigned arr[], int size);
|
||||
void init_queue(REFERENCE_PARAM(queue, q), unsigned char arr[], int size, int element_size);
|
||||
void enqueue(REFERENCE_PARAM(queue, q), unsigned value);
|
||||
unsigned dequeue(REFERENCE_PARAM(queue, q));
|
||||
int isempty(REFERENCE_PARAM(queue, q));
|
||||
|
||||
Reference in New Issue
Block a user