mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
exec_list: Add a new replace_with method.
This commit is contained in:
parent
53120805a8
commit
1fdcdb2dca
1 changed files with 11 additions and 0 deletions
|
|
@ -165,6 +165,17 @@ struct exec_node {
|
||||||
this->prev->next = before;
|
this->prev->next = before;
|
||||||
this->prev = before;
|
this->prev = before;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Replace the current node with the given node.
|
||||||
|
*/
|
||||||
|
void replace_with(exec_node *replacement)
|
||||||
|
{
|
||||||
|
replacement->prev = this->prev;
|
||||||
|
replacement->next = this->next;
|
||||||
|
|
||||||
|
this->prev->next = replacement;
|
||||||
|
this->next->prev = replacement;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is this the sentinal at the tail of the list?
|
* Is this the sentinal at the tail of the list?
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue