mirror of
				https://github.com/theoludwig/libcproject.git
				synced 2025-05-21 23:21:15 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			352 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			352 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef __QUEUE__
 | |
| #define __QUEUE__
 | |
| 
 | |
| #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
 |