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/alpha | |
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/alpha')
-rw-r--r-- | sys/arch/alpha/alpha/lock_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/alpha/include/mplock.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/alpha/alpha/lock_machdep.c b/sys/arch/alpha/alpha/lock_machdep.c index f9292e87ca0..d1267d019d4 100644 --- a/sys/arch/alpha/alpha/lock_machdep.c +++ b/sys/arch/alpha/alpha/lock_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lock_machdep.c,v 1.6 2017/05/29 14:19:49 mpi Exp $ */ +/* $OpenBSD: lock_machdep.c,v 1.7 2017/12/04 09:51:03 mpi Exp $ */ /* * Copyright (c) 2007 Artur Grabowski <art@openbsd.org> @@ -186,7 +186,7 @@ __mp_acquire_count(struct __mp_lock *mpl, int count) } 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); } diff --git a/sys/arch/alpha/include/mplock.h b/sys/arch/alpha/include/mplock.h index 8f8523a539e..664e9430b9e 100644 --- a/sys/arch/alpha/include/mplock.h +++ b/sys/arch/alpha/include/mplock.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mplock.h,v 1.1 2014/01/26 17:40:11 miod Exp $ */ +/* $OpenBSD: mplock.h,v 1.2 2017/12/04 09:51:03 mpi Exp $ */ /* * Copyright (c) 2004 Niklas Hallqvist. All rights reserved. @@ -45,7 +45,7 @@ void __mp_unlock(struct __mp_lock *); int __mp_release_all(struct __mp_lock *); int __mp_release_all_but_one(struct __mp_lock *); void __mp_acquire_count(struct __mp_lock *, int); -int __mp_lock_held(struct __mp_lock *); +int __mp_lock_held(struct __mp_lock *, struct cpu_info *); #endif |