summaryrefslogtreecommitdiff
path: root/lib/mesa/src/util/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mesa/src/util/list.h')
-rw-r--r--lib/mesa/src/util/list.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/mesa/src/util/list.h b/lib/mesa/src/util/list.h
index 0e71a66a7..383073b12 100644
--- a/lib/mesa/src/util/list.h
+++ b/lib/mesa/src/util/list.h
@@ -61,6 +61,12 @@ static inline void list_inithead(struct list_head *item)
item->next = item;
}
+/**
+ * Prepend an item to a list
+ *
+ * @param item The element to add to the list
+ * @param list The list to prepend to
+ */
static inline void list_add(struct list_head *item, struct list_head *list)
{
item->prev = list;
@@ -69,6 +75,12 @@ static inline void list_add(struct list_head *item, struct list_head *list)
list->next = item;
}
+/**
+ * Append an item to a list
+ *
+ * @param item The element to add to the list
+ * @param list The list to append to
+ */
static inline void list_addtail(struct list_head *item, struct list_head *list)
{
item->next = list;