projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3188190
)
Add queries to determine if a node is a list sentinal
author
Ian Romanick
<ian.d.romanick@intel.com>
Fri, 4 Jun 2010 23:35:42 +0000
(16:35 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Fri, 11 Jun 2010 20:51:09 +0000
(13:51 -0700)
list.h
patch
|
blob
|
history
diff --git
a/list.h
b/list.h
index 615be0543780cfd8246e24eecc595711a9eae2cd..0b91647be4f69c240da55169c8ba5b7bf4eb214a 100644
(file)
--- a/
list.h
+++ b/
list.h
@@
-140,6
+140,22
@@
struct exec_node {
this->prev->next = before;
this->prev = before;
}
+
+ /**
+ * Is this the sentinal at the tail of the list?
+ */
+ bool is_tail_sentinal() const
+ {
+ return this->next == NULL;
+ }
+
+ /**
+ * Is this the sentinal at the head of the list?
+ */
+ bool is_head_sentinal() const
+ {
+ return this->prev == NULL;
+ }
#endif
};