diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-12-04 09:51:04 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-12-04 09:51:04 +0000 |
commit | 1764f0df2a112e820709360ae1c631b59cc1bc05 (patch) | |
tree | 6882f126f28754a7a4010a36ac6b74bde6cbb1bf /sys/arch/m88k | |
parent | 7c011d9e8d8db99faeb35a7df465a3d0da5621ac (diff) |
Change __mp_lock_held() to work with an arbitrary CPU info structure and
extend ddb(4) "ps /o" output to print which CPU is currently holding the
KERNEL_LOCK().
Tested by dhill@, ok visa@
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r-- | sys/arch/m88k/include/mplock.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/m88k/include/mplock.h b/sys/arch/m88k/include/mplock.h index 8b9e828bd99..2a9e3ce9657 100644 --- a/sys/arch/m88k/include/mplock.h +++ b/sys/arch/m88k/include/mplock.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mplock.h,v 1.2 2011/03/23 16:54:35 pirofti Exp $ */ +/* $OpenBSD: mplock.h,v 1.3 2017/12/04 09:51:03 mpi Exp $ */ /* * Copyright (c) 2004 Niklas Hallqvist. All rights reserved. @@ -61,9 +61,9 @@ __mp_acquire_count(struct __mp_lock *mpl, int count) } static __inline__ int -__mp_lock_held(struct __mp_lock *mpl) +__mp_lock_held(struct __mp_lock *mpl, struct cpu_info *ci) { - return mpl->mpl_cpu == curcpu(); + return mpl->mpl_cpu == ci; } #endif |