engine_control/source/firmware/kernel/include/queue.h
tkl 4eaea0c98b - folder structure reordered
- unnecessary drivers removed
2016-07-27 14:47:22 +02:00

27 lines
469 B
C

/*
* queue.h
*
* Created on: Oct 25, 2015
* Author: tkl
*/
#ifndef QUEUE_H_
#define QUEUE_H_
struct queue_node {
struct queue_node *next;
unsigned int data;
};
struct queue {
struct queue_node *front;
struct queue_node *rear;
};
int queue_init(struct queue *head);
int queue_push(struct queue *head, struct queue_node *node);
int queue_pop(struct queue *head, struct queue_node *node);
bool queue_is_empty(struct queue *head);
#endif /* QUEUE_H_ */