Conflicts: core/include/queue.h core/queue.c cpu/msp430-common/hwtimer_cpu.c cpu/msp430x16x/hwtimer_msp430.c sys/lib/hashtable.c sys/net/ieee802154/ieee802154_frame.c sys/shell/commands/sc_cc110x_ng.c sys/transceiver/transceiver.c sys/vtimer/vtimer.c
31 lines
885 B
C
31 lines
885 B
C
/**
|
|
* @ingroup kernel
|
|
* @{
|
|
* @file
|
|
* @author Freie Universität Berlin, Computer Systems & Telematics
|
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
|
*/
|
|
|
|
#ifndef __QUEUE_H
|
|
#define __QUEUE_H
|
|
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
|
|
typedef struct queue_node_t {
|
|
struct queue_node_t *next;
|
|
unsigned int data;
|
|
uint32_t priority;
|
|
} queue_node_t;
|
|
|
|
queue_node_t *queue_remove_head(queue_node_t *root);
|
|
void queue_add_tail(queue_node_t *root, queue_node_t *new_obj);
|
|
void queue_add_head(queue_node_t *root, queue_node_t *new_obj);
|
|
queue_node_t *queue_remove_head(queue_node_t *root);
|
|
void queue_priority_add(queue_node_t *root, queue_node_t *new_obj);
|
|
void queue_priority_add_generic(queue_node_t *root, queue_node_t *new_obj, int(*cmp)(queue_node_t *, queue_node_t *)) ;
|
|
void queue_remove(queue_node_t *root, queue_node_t *node);
|
|
|
|
/** @} */
|
|
#endif // __QUEUE_H
|