WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] mini-os is missing list_top in its list.h

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] mini-os is missing list_top in its list.h
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Jul 2008 08:50:08 -0700
Delivery-date: Wed, 23 Jul 2008 08:49:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1216392279 -3600
# Node ID 60828077e1759c3a9d9506067597a8c1330c4afb
# Parent  092a15aa2430dedafc98bae7d52babb90df071a1
mini-os is missing list_top in its list.h

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 extras/mini-os/include/list.h |    6 ++++++
 1 files changed, 6 insertions(+)

diff -r 092a15aa2430 -r 60828077e175 extras/mini-os/include/list.h
--- a/extras/mini-os/include/list.h     Fri Jul 18 15:03:55 2008 +0100
+++ b/extras/mini-os/include/list.h     Fri Jul 18 15:44:39 2008 +0100
@@ -23,6 +23,12 @@ struct list_head {
 #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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] mini-os is missing list_top in its list.h, Xen patchbot-unstable <=