From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:32861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMbrT-0002yc-3L for qemu-devel@nongnu.org; Wed, 18 May 2011 04:12:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMbrR-0002n2-W8 for qemu-devel@nongnu.org; Wed, 18 May 2011 04:12:06 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:52944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMbrR-0002my-Sf for qemu-devel@nongnu.org; Wed, 18 May 2011 04:12:05 -0400 Received: by ywl41 with SMTP id 41so520547ywl.4 for ; Wed, 18 May 2011 01:12:05 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1305679930-4215-6-git-send-email-mdroth@linux.vnet.ibm.com> References: <1305679930-4215-1-git-send-email-mdroth@linux.vnet.ibm.com> <1305679930-4215-6-git-send-email-mdroth@linux.vnet.ibm.com> Date: Wed, 18 May 2011 09:12:05 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v1][ 05/23] qlist: add qlist_first()/qlist_next() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: aliguori@linux.vnet.ibm.com, qemu-devel@nongnu.org, lcapitulino@redhat.com On Wed, May 18, 2011 at 1:51 AM, Michael Roth w= rote: > > Signed-off-by: Michael Roth > --- > =A0qlist.h | =A0 10 ++++++++++ > =A01 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/qlist.h b/qlist.h > index dbe7b92..13f22eb 100644 > --- a/qlist.h > +++ b/qlist.h > @@ -50,4 +50,14 @@ QObject *qlist_peek(QList *qlist); > =A0int qlist_empty(const QList *qlist); > =A0QList *qobject_to_qlist(const QObject *obj); > > +static inline QListEntry *qlist_first(QList *qlist) > +{ > + =A0 =A0return qlist->head.tqh_first; return QTAILQ_FIRST(&qlist->head); > +} > + > +static inline QListEntry *qlist_next(QListEntry *entry) > +{ > + =A0 =A0return entry->next.tqe_next; return QTAILQ_NEXT(&entry->next);