Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec Use KDASSERT for mutex_ownable
details: https://anonhg.NetBSD.org/src/rev/b0f6d3ea667c
branches: trunk
changeset: 828148:b0f6d3ea667c
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Nov 30 02:43:49 2017 +0000
description:
Use KDASSERT for mutex_ownable
Because mutex_ownable is not cheap.
diffstat:
sys/netipsec/key.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 1038a88308fc -r b0f6d3ea667c sys/netipsec/key.c
--- a/sys/netipsec/key.c Thu Nov 30 00:13:29 2017 +0000
+++ b/sys/netipsec/key.c Thu Nov 30 02:43:49 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.243 2017/11/22 05:43:28 ozaki-r Exp $ */
+/* $NetBSD: key.c,v 1.244 2017/11/30 02:43:49 ozaki-r Exp $ */
/* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */
/* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.243 2017/11/22 05:43:28 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.244 2017/11/30 02:43:49 ozaki-r Exp $");
/*
* This code is referred to RFC 2367
@@ -837,7 +837,7 @@
ipsec_invalpcbcacheall();
#ifdef NET_MPSAFE
- KASSERT(mutex_ownable(softnet_lock));
+ KDASSERT(mutex_ownable(softnet_lock));
key_spd_pserialize_perform();
#endif
@@ -1526,7 +1526,7 @@
SAVLIST_WRITER_REMOVE(sav);
#ifdef NET_MPSAFE
- KASSERT(mutex_ownable(softnet_lock));
+ KDASSERT(mutex_ownable(softnet_lock));
key_sad_pserialize_perform();
#endif
@@ -1568,7 +1568,7 @@
mutex_enter(&key_sad.lock);
#ifdef NET_MPSAFE
- KASSERT(mutex_ownable(softnet_lock));
+ KDASSERT(mutex_ownable(softnet_lock));
key_sad_pserialize_perform();
#endif
localcount_drain(&sav->localcount, &key_sad.cv_lc, &key_sad.lock);
@@ -3049,7 +3049,7 @@
SAHLIST_WRITER_REMOVE(sah);
#ifdef NET_MPSAFE
- KASSERT(mutex_ownable(softnet_lock));
+ KDASSERT(mutex_ownable(softnet_lock));
key_sad_pserialize_perform();
#endif
Home |
Main Index |
Thread Index |
Old Index