projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46e20ce
)
mini-os is missing list_top in its list.h
author
Keir Fraser
<keir.fraser@citrix.com>
Fri, 18 Jul 2008 14:44:39 +0000
(15:44 +0100)
committer
Keir Fraser
<keir.fraser@citrix.com>
Fri, 18 Jul 2008 14:44:39 +0000
(15:44 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
extras/mini-os/include/list.h
patch
|
blob
|
history
diff --git
a/extras/mini-os/include/list.h
b/extras/mini-os/include/list.h
index 33a6d80f29c5533fdc24f1dd9d6af80bd3674ae4..fbb1fa8cc07ae600d3c572a426df4a967fe3f451 100644
(file)
--- a/
extras/mini-os/include/list.h
+++ b/
extras/mini-os/include/list.h
@@
-24,6
+24,12
@@
struct list_head {
(ptr)->next = (ptr); (ptr)->prev = (ptr); \
} while (0)
+#define list_top(head, type, member) \
+({ \
+ struct list_head *_head = (head); \
+ list_empty(_head) ? NULL : list_entry(_head->next, type, member); \
+})
+
/*
* Insert a new entry between two known consecutive entries.
*