Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Sanity-check if interlock is held when it's passed
details: https://anonhg.NetBSD.org/src/rev/07e598a07f5b
branches: trunk
changeset: 358771:07e598a07f5b
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Jan 16 08:15:29 2018 +0000
description:
Sanity-check if interlock is held when it's passed
diffstat:
sys/kern/kern_timeout.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r a3b68df85414 -r 07e598a07f5b sys/kern/kern_timeout.c
--- a/sys/kern/kern_timeout.c Tue Jan 16 08:13:47 2018 +0000
+++ b/sys/kern/kern_timeout.c Tue Jan 16 08:15:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_timeout.c,v 1.53 2018/01/09 01:44:50 christos Exp $ */
+/* $NetBSD: kern_timeout.c,v 1.54 2018/01/16 08:15:29 ozaki-r Exp $ */
/*-
* Copyright (c) 2003, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.53 2018/01/09 01:44:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.54 2018/01/16 08:15:29 ozaki-r Exp $");
/*
* Timeouts are kept in a hierarchical timing wheel. The c_time is the
@@ -473,6 +473,7 @@
KASSERT(c->c_magic == CALLOUT_MAGIC);
KASSERT(!cpu_intr_p());
+ KASSERT(interlock == NULL || mutex_owned(interlock));
lock = callout_lock(c);
relock = NULL;
Home |
Main Index |
Thread Index |
Old Index