mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Add SLIST_SWAP() macro.
MFC after: 1 week
This commit is contained in:
parent
42b73858e9
commit
4ac7bee807
1 changed files with 6 additions and 0 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue