diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-07-18 15:44:39 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-07-18 15:44:39 +0100 |
commit | 93a9aafe96ecb28c4271adb1e227a49c343f1574 (patch) | |
tree | 7d05867ee8981488585c90d726e9d6dc4ab9d62d /extras/mini-os/include | |
parent | 46e20ce8c7a93f913f1ad9cf05f9faab9c191159 (diff) | |
download | xen-93a9aafe96ecb28c4271adb1e227a49c343f1574.tar.gz xen-93a9aafe96ecb28c4271adb1e227a49c343f1574.tar.bz2 xen-93a9aafe96ecb28c4271adb1e227a49c343f1574.zip |
mini-os is missing list_top in its list.h
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'extras/mini-os/include')
-rw-r--r-- | extras/mini-os/include/list.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extras/mini-os/include/list.h b/extras/mini-os/include/list.h index 33a6d80f29..fbb1fa8cc0 100644 --- 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. * |