diff options
author | Eric Anholt <eric@anholt.net> | 2008-06-03 10:20:49 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-06-03 14:44:53 -0700 |
commit | c4857429c716f35e1fa054d1990cae28055d96d7 (patch) | |
tree | 530dfe27e5bb92330cbad027628b2da8466c932f /libdrm/xf86mm.h | |
parent | 6a9eb08a872ac0388aad2c901888888964f14559 (diff) |
Fix and hook up bufmgr code to the build.
Diffstat (limited to 'libdrm/xf86mm.h')
-rw-r--r-- | libdrm/xf86mm.h | 12 |
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; |