2 ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
5 #ifndef _KERNEL_QUEUE_H
6 #define _KERNEL_QUEUE_H
8 #include <kernel/kernel.h>
10 typedef struct queue
{
16 int queue_init(queue
*q
);
17 int queue_remove_item(queue
*q
, void *e
);
18 int queue_enqueue(queue
*q
, void *e
);
19 void *queue_dequeue(queue
*q
);
20 void *queue_peek(queue
*q
);
22 typedef struct fixed_queue
{
30 int fixed_queue_init(fixed_queue
*q
, int size
);
31 void fixed_queue_destroy(fixed_queue
*q
);
32 int fixed_queue_enqueue(fixed_queue
*q
, void *e
);
33 void *fixed_queue_dequeue(fixed_queue
*q
);
34 void *fixed_queue_peek(fixed_queue
*q
);