aboutsummaryrefslogtreecommitdiff
path: root/include/lib/queue.h
blob: c6da6eda98732babbddb988b1fd905d76fc6a181 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef LIB_QUEUE_H
#define LIB_QUEUE_H

struct Entry {
	void* value;
	struct Entry* next;
};

struct Queue {
	struct Entry start;
};

// Add to beginning of queue
void push_to_queue(struct Entry* e, struct Queue* q);
// Remove from beginning of queue
struct Entry* pop_from_queue(struct Queue* q);
// Remove the next entry
struct Entry* remove_next_from_queue(struct Entry* e);

#endif