Module Name: src
Committed By: rmind
Date: Sat May 17 20:34:49 UTC 2014
Modified Files:
src/sys/sys: queue.h
Log Message:
Add LIST_CONCAT().
To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/sys/queue.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/queue.h
diff -u src/sys/sys/queue.h:1.65 src/sys/sys/queue.h:1.66
--- src/sys/sys/queue.h:1.65 Wed Dec 25 17:19:34 2013
+++ src/sys/sys/queue.h Sat May 17 20:34:49 2014
@@ -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 @@ struct { \
((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.
*/