summaryrefslogtreecommitdiff
path: root/libdrm/xf86mm.h
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.lan>2008-06-10 17:31:54 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-06-10 17:31:54 -0700
commita1d96007241a78dd2b4a718df8e0568fe7994c22 (patch)
treeb7a4bfaa77ddf957a6ade0c47d91e14a45b91659 /libdrm/xf86mm.h
parentc987e76d953b6aecbfb69058fc4c387aa3fb33c9 (diff)
parent500c81d194115fb3c4b97d742519689478eeb4e8 (diff)
Merge commit 'origin/drm-gem' into modesetting-gem
Passed the compile test; it's ready to ship. Conflicts: libdrm/Makefile.am linux-core/Makefile.kernel linux-core/drmP.h linux-core/drm_memrange.c linux-core/drm_stub.c shared-core/drm.h shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c
Diffstat (limited to 'libdrm/xf86mm.h')
-rw-r--r--libdrm/xf86mm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h
index bb573407..a31de424 100644
--- a/libdrm/xf86mm.h
+++ b/libdrm/xf86mm.h
@@ -94,6 +94,18 @@ typedef struct _drmMMListHead
#define DRMLISTENTRY(__type, __item, __field) \
((__type *)(((char *) (__item)) - offsetof(__type, __field)))
+#define DRMLISTEMPTY(__item) ((__item)->next == (__item))
+
+#define DRMLISTFOREACHSAFE(__item, __temp, __list) \
+ for ((__item) = (__list)->next, (__temp) = (__item)->next; \
+ (__item) != (__list); \
+ (__item) = (__temp), (__temp) = (__item)->next)
+
+#define DRMLISTFOREACHSAFEREVERSE(__item, __temp, __list) \
+ for ((__item) = (__list)->prev, (__temp) = (__item)->prev; \
+ (__item) != (__list); \
+ (__item) = (__temp), (__temp) = (__item)->prev)
+
typedef struct _drmFence
{
unsigned handle;