svn commit: r216352 - stable/8/sys/sys
Konstantin Belousov
kib at FreeBSD.org
Fri Dec 10 10:37:53 UTC 2010
Author: kib
Date: Fri Dec 10 10:37:53 2010
New Revision: 216352
URL: http://svn.freebsd.org/changeset/base/216352
Log:
MFC r216149:
Add SLIST_SWAP() macro.
Approved by: re (bz)
Modified:
stable/8/sys/sys/queue.h
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/sys/queue.h
==============================================================================
--- stable/8/sys/sys/queue.h Fri Dec 10 08:53:06 2010 (r216351)
+++ stable/8/sys/sys/queue.h Fri Dec 10 10:37:53 2010 (r216352)
@@ -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.
*/
More information about the svn-src-stable
mailing list