diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-04 16:35:42 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-11 13:51:09 -0700 |
commit | 7c40a3205439e406d54feca6cd0a09fda091522c (patch) | |
tree | 515c90e9fb09353b0eac1fe4a07dfec9b65b8779 /list.h | |
parent | 31881908ebc11d84c2ff1821410c91340686aa17 (diff) |
Add queries to determine if a node is a list sentinal
Diffstat (limited to 'list.h')
-rw-r--r-- | list.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 }; |