[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 02/18] qlist: add qlist_first()/qlist_next()
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH v7 02/18] qlist: add qlist_first()/qlist_next() |
Date: |
Tue, 19 Jul 2011 14:50: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..d426bd4 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 const QListEntry *qlist_first(const QList *qlist)
+{
+ return QTAILQ_FIRST(&qlist->head);
+}
+
+static inline const QListEntry *qlist_next(const QListEntry *entry)
+{
+ return QTAILQ_NEXT(entry, next);
+}
+
#endif /* QLIST_H */
--
1.7.0.4
- [Qemu-devel] [PATCH v7 09/18] qapi: add QMP dispatch functions, (continued)
- [Qemu-devel] [PATCH v7 09/18] qapi: add QMP dispatch functions, Michael Roth, 2011/07/19
- [Qemu-devel] [PATCH v7 10/18] qapi: add ordereddict.py helper library, Michael Roth, 2011/07/19
- [Qemu-devel] [PATCH v7 11/18] qapi: add qapi.py helper libraries, Michael Roth, 2011/07/19
- [Qemu-devel] [PATCH v7 12/18] qapi: add qapi-types.py code generator, Michael Roth, 2011/07/19
- [Qemu-devel] [PATCH v7 13/18] qapi: add qapi-visit.py code generator, Michael Roth, 2011/07/19
- [Qemu-devel] [PATCH v7 14/18] qapi: add qapi-commands.py code generator, Michael Roth, 2011/07/19
- [Qemu-devel] [PATCH v7 15/18] qapi: test schema used for unit tests, Michael Roth, 2011/07/19
- [Qemu-devel] [PATCH v7 16/18] qapi: add test-visitor, tests for gen. visitor code, Michael Roth, 2011/07/19
- [Qemu-devel] [PATCH v7 18/18] qapi: add QAPI code generation documentation, Michael Roth, 2011/07/19
- [Qemu-devel] [PATCH v7 17/18] qapi: add test-qmp-commands, tests for gen. marshalling/dispatch code, Michael Roth, 2011/07/19
- [Qemu-devel] [PATCH v7 02/18] qlist: add qlist_first()/qlist_next(),
Michael Roth <=
- Re: [Qemu-devel] [QAPI+QGA 2/3] QAPI code generation infrastructure v7, Luiz Capitulino, 2011/07/20