X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Flist.h;h=6384728bc054d551fccd811cec27f43dc41d61da;hp=82c2ea4b9375855313c5b6cfaa5922415dfdeaea;hb=bf9de1b724767a7b0d9f32385ed3ab8623aabb71;hpb=63ff4873e046ba582d20e79ebff16ee7da2aa92f diff --git a/urcu/list.h b/urcu/list.h index 82c2ea4..6384728 100644 --- a/urcu/list.h +++ b/urcu/list.h @@ -80,6 +80,13 @@ list_del (list_t *elem) __list_del (elem->prev, elem->next); } +/* delete from list, add to another list as head */ +static inline void +list_move (list_t *elem, list_t *head) +{ + __list_del (elem->prev, elem->next); + list_add (elem, head); +} /* Join two lists. */ static inline void