mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
exec_list: Add pop_head
This commit is contained in:
parent
9710d272f7
commit
29eebe9a9a
1 changed files with 17 additions and 0 deletions
|
|
@ -377,6 +377,23 @@ struct exec_list {
|
|||
head = n;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the first node from a list and return it
|
||||
*
|
||||
* \return
|
||||
* The first node in the list or \c NULL if the list is empty.
|
||||
*
|
||||
* \sa exec_list::get_head
|
||||
*/
|
||||
exec_node *pop_head()
|
||||
{
|
||||
exec_node *const n = this->get_head();
|
||||
if (n != NULL)
|
||||
n->remove();
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
/**
|
||||
* Move all of the nodes from this list to the target list
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue