Date: Fri, 10 Dec 2010 10:37:53 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r216352 - stable/8/sys/sys Message-ID: <201012101037.oBAAbrGB071066@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012101037.oBAAbrGB071066>