summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_timeout.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2006-07-19 20:25:08 +0000
committermiod <miod@openbsd.org>2006-07-19 20:25:08 +0000
commit5fd0dbafc36fb8a8d9b6f366c4e38451ec24a659 (patch)
treed63c69696e7c81c8eb07b4c3dbafeac77b5b53aa /sys/kern/kern_timeout.c
parent``target kvm'' support for alpha; ok kettenis@ (diff)
downloadwireguard-openbsd-5fd0dbafc36fb8a8d9b6f366c4e38451ec24a659.tar.xz
wireguard-openbsd-5fd0dbafc36fb8a8d9b6f366c4e38451ec24a659.zip
Sprinkle some _Q_INVALIDATE love for timeout structures as well; ok otto@
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r--sys/kern/kern_timeout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index f9d7a7be16b..c5bd050bee9 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_timeout.c,v 1.24 2006/04/21 01:35:27 dlg Exp $ */
+/* $OpenBSD: kern_timeout.c,v 1.25 2006/07/19 20:25:08 miod Exp $ */
/*
* Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org>
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
@@ -30,6 +30,7 @@
#include <sys/lock.h>
#include <sys/timeout.h>
#include <sys/mutex.h>
+#include <sys/queue.h>
#ifdef DDB
#include <machine/db_machdep.h>
@@ -107,6 +108,8 @@ struct mutex timeout_mutex = MUTEX_INITIALIZER(IPL_HIGH);
#define CIRCQ_REMOVE(elem) do { \
(elem)->next->prev = (elem)->prev; \
(elem)->prev->next = (elem)->next; \
+ _Q_INVALIDATE((elem)->prev); \
+ _Q_INVALIDATE((elem)->next); \
} while (0)
#define CIRCQ_FIRST(elem) ((elem)->next)