From: Ian Romanick Date: Fri, 4 Jun 2010 23:35:42 +0000 (-0700) Subject: Add queries to determine if a node is a list sentinal X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c40a3205439e406d54feca6cd0a09fda091522c;p=mesa.git Add queries to determine if a node is a list sentinal --- diff --git a/list.h b/list.h index 615be054378..0b91647be4f 100644 --- 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 };