Can vmap unaligned paddrs
[akaros.git] / kern / include / listable.h
1 /* Copyright (c) 2009 The Regents of the University  of California. 
2  * See the COPYRIGHT files at the top of this source tree for full 
3  * license information.
4  * 
5  * Kevin Klues <klueska@cs.berkeley.edu>    
6  */
7  
8 #ifndef ROS_LISTABLE_H
9 #define ROS_LISTABLE_H
10  
11 #include <ros/common.h>
12 #include <sys/queue.h>
13
14 #define DECLARE_LISTABLE_ITEM(name, link, item)   \
15 struct name;                                      \
16 struct name {                                     \
17         LIST_ENTRY(name) link;                        \
18         item;                                         \
19 };                                                \
20 LIST_HEAD(name##_list, name);                     \
21 typedef struct name name##_t;                     \
22 typedef struct name##_list name##_list_t;
23
24 #endif //ROS_LISTABLE_H
25
26
27
28
29
30
31
32