Module Name: src
Committed By: pgoyette
Date: Mon Oct 2 05:13:44 UTC 2017
Modified Files:
src/sys/sys: queue.h
Log Message:
Fix the LIST_MOVE macro to properly update the back-pointer of the
first entry in the list.
Note that the signature of LIST_MOVE() macro also changes (it grew an
additional argument). This should not require a kernel version bump
since nothing appears to use LIST_MOVE() other than the recently added
atf test.
To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 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.70 src/sys/sys/queue.h:1.71
--- src/sys/sys/queue.h:1.70 Mon Nov 2 15:21:23 2015
+++ src/sys/sys/queue.h Mon Oct 2 05:13:44 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: queue.h,v 1.70 2015/11/02 15:21:23 christos Exp $ */
+/* $NetBSD: queue.h,v 1.71 2017/10/02 05:13:44 pgoyette Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -211,10 +211,11 @@ struct { \
((tvar) = LIST_NEXT((var), field), 1); \
(var) = (tvar))
-#define LIST_MOVE(head1, head2) do { \
+#define LIST_MOVE(head1, head2, field) do { \
LIST_INIT((head2)); \
if (!LIST_EMPTY((head1))) { \
(head2)->lh_first = (head1)->lh_first; \
+ (head2)->lh_first->field.le_prev = &(head2)->lh_first; \
LIST_INIT((head1)); \
} \
} while (/*CONSTCOND*/0)