|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] missing mini-os list_top macro
mini-os is missing list_top in its list.h
---
diff -r 37289395de03 extras/mini-os/include/list.h
--- a/extras/mini-os/include/list.h Fri Jul 18 14:20:13 2008 +0100
+++ b/extras/mini-os/include/list.h Fri Jul 18 15:05:42 2008 +0100
@@ -23,6 +23,12 @@
#define INIT_LIST_HEAD(ptr) do { \
(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.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] missing mini-os list_top macro,
Diego Ongaro <=
|
|
|
|
|