Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Add LIST_CONCAT().



details:   https://anonhg.NetBSD.org/src/rev/6e354aca7df7
branches:  trunk
changeset: 329272:6e354aca7df7
user:      rmind <rmind%NetBSD.org@localhost>
date:      Sat May 17 20:34:49 2014 +0000

description:
Add LIST_CONCAT().

diffstat:

 sys/sys/queue.h |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r c57ed855d0b6 -r 6e354aca7df7 sys/sys/queue.h
--- a/sys/sys/queue.h   Sat May 17 19:53:22 2014 +0000
+++ b/sys/sys/queue.h   Sat May 17 20:34:49 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: queue.h,v 1.65 2013/12/25 17:19:34 christos Exp $      */
+/*     $NetBSD: queue.h,v 1.66 2014/05/17 20:34:49 rmind Exp $ */
 
 /*
  * Copyright (c) 1991, 1993
@@ -211,6 +211,13 @@
            ((tvar) = LIST_NEXT((var), field), 1);                      \
            (var) = (tvar))
 
+#define        LIST_CONCAT(head1, head2) do {                                  \
+       if (!LIST_EMPTY((head2))) {                                     \
+               (head1)->lh_first = (head2)->lh_first;                  \
+               LIST_INIT((head2));                                     \
+       }                                                               \
+} while (/*CONSTCOND*/0)
+
 /*
  * List functions.
  */



Home | Main Index | Thread Index | Old Index