summaryrefslogtreecommitdiff
path: root/libdrm/xf86mm.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-08-08 14:05:01 -0700
committerEric Anholt <eric@anholt.net>2008-08-08 14:05:01 -0700
commite1b8e79796b172c356af98eb49107c8abbebfe5a (patch)
tree4af674ca495ca93535f057ea4c0385c57825c2e4 /libdrm/xf86mm.h
parent0c47151a571827905c34649208e22f8ec0175d62 (diff)
parent46e9274e8538e5b0517f611dca99dde611f4e95d (diff)
Merge branch 'drm-gem'
Conflicts: shared-core/i915_dma.c This brings in kernel support and userland interface for intel GEM.
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;