From cad9766118d269725ef33b4e9588d674d5225010 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Apr 2010 11:46:26 -0700 Subject: Inline functions consisting of a return of an expression. --- list.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'list.h') diff --git a/list.h b/list.h index 054be7ed43..afa32f1ed9 100644 --- a/list.h +++ b/list.h @@ -126,6 +126,17 @@ struct exec_node { this->next->prev = after; this->next = after; } + /** + * Insert a node in the list before the current node + */ + void insert_before(exec_node *before) + { + before->next = this; + before->prev = this->prev; + + this->prev->next = before; + this->prev = before; + } #endif }; -- cgit v1.2.3