mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 15:40:11 +01:00
glsl/list: Add an exec_list_is_singular() helper.
Similar to list_is_singular() in util/list.h. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
376c3e8f87
commit
08dc93c67c
1 changed files with 7 additions and 0 deletions
|
|
@ -372,6 +372,13 @@ exec_list_is_empty(const struct exec_list *list)
|
|||
return list->head_sentinel.next == &list->tail_sentinel;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
exec_list_is_singular(const struct exec_list *list)
|
||||
{
|
||||
return !exec_list_is_empty(list) &&
|
||||
list->head_sentinel.next->next == &list->tail_sentinel;
|
||||
}
|
||||
|
||||
static inline const struct exec_node *
|
||||
exec_list_get_head_const(const struct exec_list *list)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue