From patchwork Wed May 18 00:51:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 96094 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0BE5AB6EE8 for ; Wed, 18 May 2011 10:56:12 +1000 (EST) Received: from localhost ([::1]:50082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMV3Z-0000Xv-Fo for incoming@patchwork.ozlabs.org; Tue, 17 May 2011 20:56:09 -0400 Received: from eggs.gnu.org ([140.186.70.92]:35642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMV1g-0006IR-Um for qemu-devel@nongnu.org; Tue, 17 May 2011 20:54:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMV1g-0005LZ-0p for qemu-devel@nongnu.org; Tue, 17 May 2011 20:54:12 -0400 Received: from mout.perfora.net ([74.208.4.194]:63171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMV1f-0005LP-QR for qemu-devel@nongnu.org; Tue, 17 May 2011 20:54:11 -0400 Received: from localhost.localdomain ([32.97.110.59]) by mrelay.perfora.net (node=mrus4) with ESMTP (Nemesis) id 0MX0yC-1QAUTi1v6a-00WrKX; Tue, 17 May 2011 20:54:10 -0400 From: Michael Roth To: qemu-devel@nongnu.org Date: Tue, 17 May 2011 19:51:52 -0500 Message-Id: <1305679930-4215-6-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1305679930-4215-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1305679930-4215-1-git-send-email-mdroth@linux.vnet.ibm.com> X-Provags-ID: V02:K0:lbbew6/15yLKFRtmkHpMqVdpAuq9Ro0l+8kEz6qc2MQ e4mgyyhlWJNRrVVMe1sZskPmPVxCQ9mfatqrv5qhr3lLO8Fvkh RDsxtUxV+2bd9MZYCKw9NNxDH7DndFO0IJi8P/NWptdEDM4vTe 2r5VvDoGZTWwLKIFIykUla1HRhUG1ZffKk2kDjK2OIHnP9bZdt Sw3Vk9lcDmYW1i1J9TCuZ3L9gIOEZ9bYcb6Fmi6UDI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.208.4.194 Cc: aliguori@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH v1][ 05/23] qlist: add qlist_first()/qlist_next() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Michael Roth --- qlist.h | 10 ++++++++++ 1 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); int qlist_empty(const QList *qlist); QList *qobject_to_qlist(const QObject *obj); +static inline QListEntry *qlist_first(QList *qlist) +{ + return qlist->head.tqh_first; +} + +static inline QListEntry *qlist_next(QListEntry *entry) +{ + return entry->next.tqe_next; +} + #endif /* QLIST_H */