projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43bfc2b
)
exec_list: Add simpler exec_list for-each macros
author
Ian Romanick
<ian.d.romanick@intel.com>
Mon, 10 May 2010 18:17:23 +0000
(11:17 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Mon, 10 May 2010 18:17:23 +0000
(11:17 -0700)
list.h
patch
|
blob
|
history
diff --git
a/list.h
b/list.h
index
2694174
..
3bfdf55
100644
(file)
--- a/
list.h
+++ b/
list.h
@@
-337,4
+337,14
@@
struct exec_list {
#endif
};
+#define foreach_list(__node, __list) \
+ for (exec_node * __node = (__list)->head \
+ ; (__node)->next != NULL \
+ ; (__node) = (__node)->next)
+
+#define foreach_list_const(__node, __list) \
+ for (const exec_node * __node = (__list)->head \
+ ; (__node)->next != NULL \
+ ; (__node) = (__node)->next)
+
#endif /* LIST_CONTAINER_H */