summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--openbsd-compat/sys-queue.h21
2 files changed, 26 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 238e6c45a..33798ba94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -118,6 +118,11 @@
118 [openbsd-compat/sys-queue.h] 118 [openbsd-compat/sys-queue.h]
119 Some uvm problem is being exposed with the more strict macros. 119 Some uvm problem is being exposed with the more strict macros.
120 Revert until we've found out what's causing the panics. 120 Revert until we've found out what's causing the panics.
121 - otto@cvs.openbsd.org 2005/11/25 08:06:25
122 [openbsd-compat/sys-queue.h]
123 Introduce debugging aid for queue macros. Disabled by default; but
124 developers are encouraged to run with this enabled.
125 ok krw@ fgsch@ deraadt@
121 - (djm) [regress/sftp-cmds.sh] 126 - (djm) [regress/sftp-cmds.sh]
122 Use more restrictive glob to pick up test files from /bin - some platforms 127 Use more restrictive glob to pick up test files from /bin - some platforms
123 ship broken symlinks there which could spoil the test. 128 ship broken symlinks there which could spoil the test.
@@ -3394,4 +3399,4 @@
3394 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3399 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3395 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3400 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3396 3401
3397$Id: ChangeLog,v 1.4790 2007/10/26 06:44:27 djm Exp $ 3402$Id: ChangeLog,v 1.4791 2007/10/26 06:45:32 djm Exp $
diff --git a/openbsd-compat/sys-queue.h b/openbsd-compat/sys-queue.h
index db747befa..7d231bca8 100644
--- a/openbsd-compat/sys-queue.h
+++ b/openbsd-compat/sys-queue.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: queue.h,v 1.30 2005/10/25 06:37:47 otto Exp $ */ 1/* $OpenBSD: queue.h,v 1.31 2005/11/25 08:06:25 otto Exp $ */
2/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */ 2/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
3 3
4/* 4/*
@@ -167,6 +167,12 @@
167 * For details on the use of these macros, see the queue(3) manual page. 167 * For details on the use of these macros, see the queue(3) manual page.
168 */ 168 */
169 169
170#ifdef QUEUE_MACRO_DEBUG
171#define _Q_INVALIDATE(a) (a) = ((void *)-1)
172#else
173#define _Q_INVALIDATE(a)
174#endif
175
170/* 176/*
171 * Singly-linked List definitions. 177 * Singly-linked List definitions.
172 */ 178 */
@@ -236,6 +242,7 @@ struct { \
236 curelm = curelm->field.sle_next; \ 242 curelm = curelm->field.sle_next; \
237 curelm->field.sle_next = \ 243 curelm->field.sle_next = \
238 curelm->field.sle_next->field.sle_next; \ 244 curelm->field.sle_next->field.sle_next; \
245 _Q_INVALIDATE((elm)->field.sle_next); \
239 } \ 246 } \
240} while (0) 247} while (0)
241 248
@@ -303,6 +310,8 @@ struct { \
303 (elm)->field.le_next->field.le_prev = \ 310 (elm)->field.le_next->field.le_prev = \
304 (elm)->field.le_prev; \ 311 (elm)->field.le_prev; \
305 *(elm)->field.le_prev = (elm)->field.le_next; \ 312 *(elm)->field.le_prev = (elm)->field.le_next; \
313 _Q_INVALIDATE((elm)->field.le_prev); \
314 _Q_INVALIDATE((elm)->field.le_next); \
306} while (0) 315} while (0)
307 316
308#define LIST_REPLACE(elm, elm2, field) do { \ 317#define LIST_REPLACE(elm, elm2, field) do { \
@@ -311,6 +320,8 @@ struct { \
311 &(elm2)->field.le_next; \ 320 &(elm2)->field.le_next; \
312 (elm2)->field.le_prev = (elm)->field.le_prev; \ 321 (elm2)->field.le_prev = (elm)->field.le_prev; \
313 *(elm2)->field.le_prev = (elm2); \ 322 *(elm2)->field.le_prev = (elm2); \
323 _Q_INVALIDATE((elm)->field.le_prev); \
324 _Q_INVALIDATE((elm)->field.le_next); \
314} while (0) 325} while (0)
315 326
316/* 327/*
@@ -465,6 +476,8 @@ struct { \
465 else \ 476 else \
466 (head)->tqh_last = (elm)->field.tqe_prev; \ 477 (head)->tqh_last = (elm)->field.tqe_prev; \
467 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ 478 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
479 _Q_INVALIDATE((elm)->field.tqe_prev); \
480 _Q_INVALIDATE((elm)->field.tqe_next); \
468} while (0) 481} while (0)
469 482
470#define TAILQ_REPLACE(head, elm, elm2, field) do { \ 483#define TAILQ_REPLACE(head, elm, elm2, field) do { \
@@ -475,6 +488,8 @@ struct { \
475 (head)->tqh_last = &(elm2)->field.tqe_next; \ 488 (head)->tqh_last = &(elm2)->field.tqe_next; \
476 (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \ 489 (elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
477 *(elm2)->field.tqe_prev = (elm2); \ 490 *(elm2)->field.tqe_prev = (elm2); \
491 _Q_INVALIDATE((elm)->field.tqe_prev); \
492 _Q_INVALIDATE((elm)->field.tqe_next); \
478} while (0) 493} while (0)
479 494
480/* 495/*
@@ -575,6 +590,8 @@ struct { \
575 else \ 590 else \
576 (elm)->field.cqe_prev->field.cqe_next = \ 591 (elm)->field.cqe_prev->field.cqe_next = \
577 (elm)->field.cqe_next; \ 592 (elm)->field.cqe_next; \
593 _Q_INVALIDATE((elm)->field.cqe_prev); \
594 _Q_INVALIDATE((elm)->field.cqe_next); \
578} while (0) 595} while (0)
579 596
580#define CIRCLEQ_REPLACE(head, elm, elm2, field) do { \ 597#define CIRCLEQ_REPLACE(head, elm, elm2, field) do { \
@@ -588,6 +605,8 @@ struct { \
588 (head).cqh_first = (elm2); \ 605 (head).cqh_first = (elm2); \
589 else \ 606 else \
590 (elm2)->field.cqe_prev->field.cqe_next = (elm2); \ 607 (elm2)->field.cqe_prev->field.cqe_next = (elm2); \
608 _Q_INVALIDATE((elm)->field.cqe_prev); \
609 _Q_INVALIDATE((elm)->field.cqe_next); \
591} while (0) 610} while (0)
592 611
593#endif /* !_FAKE_QUEUE_H_ */ 612#endif /* !_FAKE_QUEUE_H_ */