aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_double_list.h
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-03-23 12:05:07 +0000
committerJosé Fonseca <[email protected]>2009-03-23 12:05:07 +0000
commit3708aaeaff5041040783bd252768fadf2b794ec2 (patch)
treeb725658e6748ec7b5aae93119beb88adc152b7b0 /src/gallium/auxiliary/util/u_double_list.h
parentbab6d6bfe928687717a5e5f274110fe1838f99ba (diff)
util: Add a new macro for testing empty lists.
Diffstat (limited to 'src/gallium/auxiliary/util/u_double_list.h')
-rw-r--r--src/gallium/auxiliary/util/u_double_list.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_double_list.h b/src/gallium/auxiliary/util/u_double_list.h
index d108d92e52b..53bb1342ddc 100644
--- a/src/gallium/auxiliary/util/u_double_list.h
+++ b/src/gallium/auxiliary/util/u_double_list.h
@@ -95,5 +95,8 @@ struct list_head
#define LIST_ENTRY(__type, __item, __field) \
((__type *)(((char *)(__item)) - offsetof(__type, __field)))
+#define LIST_IS_EMPTY(__list) \
+ ((__list)->next == (__list))
+
#endif /*_U_DOUBLE_LIST_H_*/