Date: Fri, 3 Dec 2010 16:07:50 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r216149 - head/sys/sys Message-ID: <201012031607.oB3G7oXB096333@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Dec 3 16:07:50 2010 New Revision: 216149 URL: http://svn.freebsd.org/changeset/base/216149 Log: Add SLIST_SWAP() macro. MFC after: 1 week Modified: head/sys/sys/queue.h Modified: head/sys/sys/queue.h ============================================================================== --- head/sys/sys/queue.h Fri Dec 3 14:20:20 2010 (r216148) +++ head/sys/sys/queue.h Fri Dec 3 16:07:50 2010 (r216149) @@ -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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012031607.oB3G7oXB096333>