forked from PAWPAW-Mirror/lib_xua
Convert to use unsigned buffer
This commit is contained in:
@@ -5,16 +5,16 @@
|
||||
#include <xccompat.h>
|
||||
|
||||
typedef struct queue {
|
||||
intptr_t data;
|
||||
uintptr_t data;
|
||||
int rdptr; // Using absolute indices which count reads and writes so this needs to be considered when accessing.
|
||||
int wrptr;
|
||||
int size;
|
||||
int mask;
|
||||
} queue;
|
||||
|
||||
void init_queue(REFERENCE_PARAM(queue, q), int arr[], int size);
|
||||
void enqueue(REFERENCE_PARAM(queue, q), int value);
|
||||
int dequeue(REFERENCE_PARAM(queue, q));
|
||||
void init_queue(REFERENCE_PARAM(queue, q), unsigned arr[], int size);
|
||||
void enqueue(REFERENCE_PARAM(queue, q), unsigned value);
|
||||
unsigned dequeue(REFERENCE_PARAM(queue, q));
|
||||
int isempty(REFERENCE_PARAM(queue, q));
|
||||
int isfull(REFERENCE_PARAM(queue, q));
|
||||
int items(REFERENCE_PARAM(queue, q));
|
||||
|
||||
Reference in New Issue
Block a user