Consistently use KPREEMPT_*() here.

This commit is contained in:
uebayasi 2014-11-28 08:27:27 +00:00
parent 079ede64b0
commit f0f069cba4
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_mutex.c,v 1.60 2014/09/19 17:52:43 matt Exp $ */
/* $NetBSD: kern_mutex.c,v 1.61 2014/11/28 08:27:27 uebayasi Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@ -40,7 +40,7 @@
#define __MUTEX_PRIVATE
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.60 2014/09/19 17:52:43 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.61 2014/11/28 08:27:27 uebayasi Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@ -534,7 +534,7 @@ mutex_vector_enter(kmutex_t *mtx)
continue;
}
if (__predict_false(panicstr != NULL)) {
kpreempt_enable();
KPREEMPT_ENABLE(curlwp);
return;
}
if (__predict_false(MUTEX_OWNER(owner) == curthread)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_rwlock.c,v 1.44 2014/09/05 05:57:21 matt Exp $ */
/* $NetBSD: kern_rwlock.c,v 1.45 2014/11/28 08:28:17 uebayasi Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.44 2014/09/05 05:57:21 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.45 2014/11/28 08:28:17 uebayasi Exp $");
#define __RWLOCK_PRIVATE
@ -334,7 +334,7 @@ rw_vector_enter(krwlock_t *rw, const krw_t op)
continue;
}
if (__predict_false(panicstr != NULL)) {
kpreempt_enable();
KPREEMPT_ENABLE(curlwp);
return;
}
if (__predict_false(RW_OWNER(rw) == curthread)) {