1
1
mirror of https://github.com/theoludwig/libcproject.git synced 2024-09-19 21:35:53 +02:00
libcproject/lib/queue.h

25 lines
371 B
C
Raw Normal View History

2023-01-05 19:28:05 +01:00
#ifndef __QUEUE__
#define __QUEUE__
2023-01-07 19:38:01 +01:00
#include <stdio.h>
2023-01-05 19:28:05 +01:00
#include <stdlib.h>
// FIFO = First In First Out
struct queue {
struct queue_node *first;
size_t length;
};
struct queue_node {
void *data;
struct queue_node *next;
};
struct queue *queue_initialization();
void queue_push(struct queue *queue, void *data);
void *queue_pop(struct queue *queue);
#endif