From c4857429c716f35e1fa054d1990cae28055d96d7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 3 Jun 2008 10:20:49 -0700 Subject: Fix and hook up bufmgr code to the build. --- libdrm/xf86mm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libdrm/xf86mm.h') 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; -- cgit v1.2.3