Re: [Mesa-dev] [PATCH 09/13] util/list: Add list_empty and list_length functions

2015-05-11 Thread Neil Roberts
Ian Romanick writes: >> For what it's worth, I'm strongly in favour of using these >> kernel-style lists instead of exec_list. The kernel ones seem much >> less confusing. > > Huh? They're practically identical. The only difference is the > kernel-style lists have a single sentinel node, and that

Re: [Mesa-dev] [PATCH 09/13] util/list: Add list_empty and list_length functions

2015-05-07 Thread Ian Romanick
On 05/05/2015 11:21 AM, Neil Roberts wrote: > Jason Ekstrand writes: > >> +static inline bool list_empty(struct list_head *list) >> +{ >> + return list->next == list; >> +} > > It would be good if list.h also included stdbool.h in order to get the > declaration of bool. However, will that caus

Re: [Mesa-dev] [PATCH 09/13] util/list: Add list_empty and list_length functions

2015-05-05 Thread Brian Paul
On 05/05/2015 12:21 PM, Neil Roberts wrote: Jason Ekstrand writes: +static inline bool list_empty(struct list_head *list) +{ + return list->next == list; +} It would be good if list.h also included stdbool.h in order to get the declaration of bool. However, will that cause problems on MSVC

Re: [Mesa-dev] [PATCH 09/13] util/list: Add list_empty and list_length functions

2015-05-05 Thread Jason Ekstrand
On Tue, May 5, 2015 at 11:21 AM, Neil Roberts wrote: > Jason Ekstrand writes: > >> +static inline bool list_empty(struct list_head *list) >> +{ >> + return list->next == list; >> +} > > It would be good if list.h also included stdbool.h in order to get the > declaration of bool. However, will t

Re: [Mesa-dev] [PATCH 09/13] util/list: Add list_empty and list_length functions

2015-05-05 Thread Neil Roberts
Jason Ekstrand writes: > +static inline bool list_empty(struct list_head *list) > +{ > + return list->next == list; > +} It would be good if list.h also included stdbool.h in order to get the declaration of bool. However, will that cause problems on MSVC? Is the Gallium code compiled on MSVC i

[Mesa-dev] [PATCH 09/13] util/list: Add list_empty and list_length functions

2015-04-27 Thread Jason Ekstrand
--- src/util/list.h | 13 + 1 file changed, 13 insertions(+) diff --git a/src/util/list.h b/src/util/list.h index 6144b0c..246f826 100644 --- a/src/util/list.h +++ b/src/util/list.h @@ -92,6 +92,19 @@ static inline void list_delinit(struct list_head *item) item->prev = item; }