Minor fix for preemption safety.
This commit is contained in:
parent
12e587a1a3
commit
02691198b8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_mutex.c,v 1.35 2008/04/22 14:46:35 ad Exp $ */
|
||||
/* $NetBSD: kern_mutex.c,v 1.36 2008/04/27 14:29:09 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -47,7 +47,7 @@
|
|||
#define __MUTEX_PRIVATE
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.35 2008/04/22 14:46:35 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_mutex.c,v 1.36 2008/04/27 14:29:09 ad Exp $");
|
||||
|
||||
#include "opt_multiprocessor.h"
|
||||
|
||||
|
@ -130,10 +130,11 @@ do { \
|
|||
|
||||
#define MUTEX_SPIN_SPLRAISE(mtx) \
|
||||
do { \
|
||||
struct cpu_info *x__ci = curcpu(); \
|
||||
struct cpu_info *x__ci; \
|
||||
int x__cnt, s; \
|
||||
x__cnt = x__ci->ci_mtx_count--; \
|
||||
s = splraiseipl(mtx->mtx_ipl); \
|
||||
x__ci = curcpu(); \
|
||||
x__cnt = x__ci->ci_mtx_count--; \
|
||||
if (x__cnt == MUTEX_COUNT_BIAS) \
|
||||
x__ci->ci_mtx_oldspl = (s); \
|
||||
} while (/* CONSTCOND */ 0)
|
||||
|
|
Loading…
Reference in New Issue