Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Expunge the panicstr checks, we don't need them.
details: https://anonhg.NetBSD.org/src/rev/dc0fac27e7a4
branches: trunk
changeset: 466050:dc0fac27e7a4
user: ad <ad%NetBSD.org@localhost>
date: Mon Dec 09 21:02:10 2019 +0000
description:
Expunge the panicstr checks, we don't need them.
diffstat:
sys/kern/kern_rwlock.c | 17 ++---------------
1 files changed, 2 insertions(+), 15 deletions(-)
diffs (66 lines):
diff -r 30586189f420 -r dc0fac27e7a4 sys/kern/kern_rwlock.c
--- a/sys/kern/kern_rwlock.c Mon Dec 09 21:00:48 2019 +0000
+++ b/sys/kern/kern_rwlock.c Mon Dec 09 21:02:10 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_rwlock.c,v 1.58 2019/11/30 14:21:16 ad Exp $ */
+/* $NetBSD: kern_rwlock.c,v 1.59 2019/12/09 21:02:10 ad Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.58 2019/11/30 14:21:16 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.59 2019/12/09 21:02:10 ad Exp $");
#define __RWLOCK_PRIVATE
@@ -357,10 +357,6 @@
owner = next;
continue;
}
- if (__predict_false(panicstr != NULL)) {
- KPREEMPT_ENABLE(curlwp);
- return;
- }
if (__predict_false(RW_OWNER(rw) == curthread)) {
rw_abort(__func__, __LINE__, rw,
"locking against myself");
@@ -450,9 +446,6 @@
curthread = (uintptr_t)curlwp;
RW_ASSERT(rw, curthread != 0);
- if (__predict_false(panicstr != NULL))
- return;
-
/*
* Again, we use a trick. Since we used an add operation to
* set the required lock bits, we can use a subtract to clear
@@ -729,8 +722,6 @@
{
uintptr_t owner;
- if (panicstr != NULL)
- return 1;
if (rw == NULL)
return 0;
owner = rw->rw_owner;
@@ -748,8 +739,6 @@
rw_write_held(krwlock_t *rw)
{
- if (panicstr != NULL)
- return 1;
if (rw == NULL)
return 0;
return (rw->rw_owner & (RW_WRITE_LOCKED | RW_THREAD)) ==
@@ -767,8 +756,6 @@
rw_lock_held(krwlock_t *rw)
{
- if (panicstr != NULL)
- return 1;
if (rw == NULL)
return 0;
return (rw->rw_owner & RW_THREAD) != 0;
Home |
Main Index |
Thread Index |
Old Index