Re: [Mesa-dev] [PATCH 10/13] util/list: Add a list validation function

2015-05-05 Thread Jason Ekstrand
On Tue, May 5, 2015 at 11:25 AM, Neil Roberts wrote: > Jason Ekstrand writes: > >> +static inline void list_validate(struct list_head *list) >> +{ >> + assert(list->next->prev == list && list->prev->next == list); >> + for (struct list_head *node = list->next; node != list; node = >> node->n

Re: [Mesa-dev] [PATCH 10/13] util/list: Add a list validation function

2015-05-05 Thread Neil Roberts
Jason Ekstrand writes: > +static inline void list_validate(struct list_head *list) > +{ > + assert(list->next->prev == list && list->prev->next == list); > + for (struct list_head *node = list->next; node != list; node = node->next) > + assert(node->next->prev == node && node->prev->next

[Mesa-dev] [PATCH 10/13] util/list: Add a list validation function

2015-04-27 Thread Jason Ekstrand
--- src/util/list.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/util/list.h b/src/util/list.h index 246f826..f11b858 100644 --- a/src/util/list.h +++ b/src/util/list.h @@ -105,6 +105,13 @@ static inline unsigned list_length(struct list_head *list) return length; } +static