From: Diego Ongaro <diego.ongaro@citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] missing mini-os list_top macro
Date: Fri, 18 Jul 2008 15:18:19 +0100 [thread overview]
Message-ID: <4880A62B.3050205@citrix.com> (raw)
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.
reply other threads:[~2008-07-18 14:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4880A62B.3050205@citrix.com \
--to=diego.ongaro@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.