[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1][ 02/21] qlist: add qlist_first()/qlist_next()
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH v1][ 02/21] qlist: add qlist_first()/qlist_next() |
Date: |
Wed, 1 Jun 2011 12:24:30 -0500 |
Signed-off-by: Michael Roth <address@hidden>
---
qlist.h | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/qlist.h b/qlist.h
index dbe7b92..cd2d23e 100644
--- a/qlist.h
+++ b/qlist.h
@@ -16,6 +16,7 @@
#include "qobject.h"
#include "qemu-queue.h"
#include "qemu-common.h"
+#include "qemu-queue.h"
typedef struct QListEntry {
QObject *value;
@@ -50,4 +51,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 QTAILQ_FIRST(&qlist->head);
+}
+
+static inline QListEntry *qlist_next(QListEntry *entry)
+{
+ return QTAILQ_NEXT(entry, next);
+}
+
#endif /* QLIST_H */
--
1.7.0.4
- [Qemu-devel] [PATCH v1][ 16/21] qapi: test schema used for unit tests, (continued)
- [Qemu-devel] [PATCH v1][ 16/21] qapi: test schema used for unit tests, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 17/21] qapi: add test-visiter, tests for gen. visiter code, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 18/21] qapi: Makefile changes to build test-visiter, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 10/21] qapi: add QMP input visiter, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 11/21] qapi: add QMP output visiter, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 09/21] qapi: add qapi-visit-core.h, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 21/21] qapi: add QAPI code generation documentation, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 08/21] qapi: add qapi-types-core.h, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 20/21] qapi: Makefile changes to build test-qmp-commands, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 02/21] qlist: add qlist_first()/qlist_next(),
Michael Roth <=
- [Qemu-devel] [PATCH v1][ 01/21] Add hard build dependency on glib, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 07/21] qapi: add qapi-commands.py code generator, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 03/21] qapi: add module init types for qapi, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 13/21] qapi: add command registration/lookup functions, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 04/21] qapi: add ordereddict/qapi.py helper libraries, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 14/21] qapi: add QMP dispatch functions, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 12/21] qapi: add QAPI dealloc visiter, Michael Roth, 2011/06/01
- [Qemu-devel] [PATCH v1][ 19/21] qapi: add test-qmp-commands, tests for gen. marshalling/dispatch code, Michael Roth, 2011/06/01