diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-19 11:34:23 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-03-19 11:34:23 +0000 |
commit | cde54d41d41ecc698408ab4c1f6c1ed3bdcd939e (patch) | |
tree | d9413614165f0ac9fd7494467fa1480622305bc0 /sys/arch/powerpc | |
parent | aead540ed22f539ba3dbfa37327af5dd4c8fe578 (diff) |
Reduces the noise around the global ``ticks'' variable by renaming
all the local ones to ``nticks''.
ok stefan@, deraadt@
Diffstat (limited to 'sys/arch/powerpc')
-rw-r--r-- | sys/arch/powerpc/powerpc/lock_machdep.c | 8 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/mutex.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/powerpc/powerpc/lock_machdep.c b/sys/arch/powerpc/powerpc/lock_machdep.c index 45d1df387ac..c1ab6e6c678 100644 --- a/sys/arch/powerpc/powerpc/lock_machdep.c +++ b/sys/arch/powerpc/powerpc/lock_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lock_machdep.c,v 1.3 2015/08/14 06:14:19 dlg Exp $ */ +/* $OpenBSD: lock_machdep.c,v 1.4 2016/03/19 11:34:22 mpi Exp $ */ /* * Copyright (c) 2007 Artur Grabowski <art@openbsd.org> @@ -49,12 +49,12 @@ __mp_lock_spin(struct __mp_lock *mpl) while (mpl->mpl_count != 0) SPINLOCK_SPIN_HOOK; #else - int ticks = __mp_lock_spinout; + int nticks = __mp_lock_spinout; - while (mpl->mpl_count != 0 && --ticks > 0) + while (mpl->mpl_count != 0 && --nticks > 0) SPINLOCK_SPIN_HOOK; - if (ticks == 0) { + if (nticks == 0) { db_printf("__mp_lock(%p): lock spun out", mpl); Debugger(); } diff --git a/sys/arch/powerpc/powerpc/mutex.c b/sys/arch/powerpc/powerpc/mutex.c index 2e51bba22c7..1428dfb595a 100644 --- a/sys/arch/powerpc/powerpc/mutex.c +++ b/sys/arch/powerpc/powerpc/mutex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mutex.c,v 1.2 2015/09/21 06:21:49 kettenis Exp $ */ +/* $OpenBSD: mutex.c,v 1.3 2016/03/19 11:34:22 mpi Exp $ */ /* * Copyright (c) 2004 Artur Grabowski <art@openbsd.org> @@ -57,14 +57,14 @@ void mtx_enter(struct mutex *mtx) { #if defined(MP_LOCKDEBUG) - int ticks = __mp_lock_spinout; + int nticks = __mp_lock_spinout; #endif while (mtx_enter_try(mtx) == 0) { SPINLOCK_SPIN_HOOK; #if defined(MP_LOCKDEBUG) - if (--ticks == 0) { + if (--nticks == 0) { db_printf("%s: %p lock spun out", __func__, mtx); Debugger(); } |