X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=urcu%2Flist.h;h=d26751204192993c68c48010f7e931e18c6bfa2b;hb=5db941e8f87f9728883c2dd0446698d13d5b9fec;hp=6384728bc054d551fccd811cec27f43dc41d61da;hpb=4543556ae5911160e878f8f882d75baa6e94a5d5;p=urcu.git diff --git a/urcu/list.h b/urcu/list.h index 6384728..d267512 100644 --- a/urcu/list.h +++ b/urcu/list.h @@ -88,6 +88,17 @@ list_move (list_t *elem, list_t *head) list_add (elem, head); } +/* replace an old entry. + */ +static inline void +list_replace(list_t *old, list_t *_new) +{ + _new->next = old->next; + _new->prev = old->prev; + _new->prev->next = _new; + _new->next->prev = _new; +} + /* Join two lists. */ static inline void list_splice (list_t *add, list_t *head)