Add SLIST_SWAP() macro.

MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2010-12-03 16:07:50 +00:00
parent 42b73858e9
commit 4ac7bee807

View file

@ -213,6 +213,12 @@ struct { \
SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \
} while (0)
#define SLIST_SWAP(head1, head2, type) do { \
struct type *swap_first = SLIST_FIRST(head1); \
SLIST_FIRST(head1) = SLIST_FIRST(head2); \
SLIST_FIRST(head2) = swap_first; \
} while (0)
/*
* Singly-linked Tail queue declarations.
*/