Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


modified copyright tags
[palacios.git] / palacios / include / geekos / queue.h
1 /* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
2 /* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
3
4 #ifndef __QUEUE_H__
5 #define __QUEUE_H__
6
7 #include <geekos/list2.h>
8 #include <geekos/ktypes.h>
9 #include <geekos/malloc.h>
10
11
12 /* IMPORTANT:
13  * This implementation currently does no locking, and as such is not 
14  * SMP/thread/interrupt safe
15  */
16
17
18 struct queue_entry {
19   void * entry;
20   struct list_head entry_list;
21 };
22
23
24 struct gen_queue {
25   uint_t num_entries;
26   struct list_head entries;
27
28   // We really need to implement this....
29   // void * lock;
30 };
31
32
33 struct gen_queue * create_queue();
34 void init_queue(struct gen_queue * queue);
35
36 void enqueue(struct gen_queue * queue, void * entry);
37 void * dequeue(struct gen_queue * queue);
38
39
40
41
42 #endif