projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9710d27
)
exec_list: Add pop_head
author
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 17 Aug 2010 01:02:11 +0000
(18:02 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Fri, 3 Sep 2010 18:55:21 +0000
(11:55 -0700)
src/glsl/list.h
patch
|
blob
|
history
diff --git
a/src/glsl/list.h
b/src/glsl/list.h
index a70b79d571f298aa994e5ab87402d87cee0b5ced..764777431067f8f9067041b8421464252ea2b52d 100644
(file)
--- a/
src/glsl/list.h
+++ b/
src/glsl/list.h
@@
-377,6
+377,23
@@
struct exec_list {
head = n;
}
+ /**
+ * Remove the first node from a list and return it
+ *
+ * \return
+ * The first node in the list or \c NULL if the list is empty.
+ *
+ * \sa exec_list::get_head
+ */
+ exec_node *pop_head()
+ {
+ exec_node *const n = this->get_head();
+ if (n != NULL)
+ n->remove();
+
+ return n;
+ }
+
/**
* Move all of the nodes from this list to the target list
*/