Commit 490048d7 authored by Jonathan Jenkins's avatar Jonathan Jenkins

utility function for quicklist

parent a34a36d0
...@@ -142,6 +142,23 @@ static __inline__ struct qlist_head* qlist_pop(struct qlist_head *head) ...@@ -142,6 +142,23 @@ static __inline__ struct qlist_head* qlist_pop(struct qlist_head *head)
return item; return item;
} }
/**
* qlist_pop_back - pop the last item off the list and return it
* @head: qlist to modify
*/
static __inline__ struct qlist_head* qlist_pop_back(struct qlist_head *head)
{
struct qlist_head *item = NULL;
if (!qlist_empty(head))
{
item = head->prev;
qlist_del(item);
}
return item;
}
/** /**
* qlist_splice - join two qlists * qlist_splice - join two qlists
* @qlist: the new qlist to add. * @qlist: the new qlist to add.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment