diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2007-11-27 15:56:12 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2007-11-27 15:56:12 +0000 |
commit | 520bcc36cc6706cd491659afa02bfe6531718f68 (patch) | |
tree | 63e175caf088b3b28895fb3407cde0d4c693316c /sys/arch/amd64 | |
parent | f433f76fb87c981ed09ba271cd1d72b12ad1071c (diff) |
ARGH. Work has poisoned my mind. KNF the braces.
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/lock_machdep.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/arch/amd64/amd64/lock_machdep.c b/sys/arch/amd64/amd64/lock_machdep.c index c9c76015956..f1740fae4e0 100644 --- a/sys/arch/amd64/amd64/lock_machdep.c +++ b/sys/arch/amd64/amd64/lock_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lock_machdep.c,v 1.1 2007/11/26 23:50:03 art Exp $ */ +/* $OpenBSD: lock_machdep.c,v 1.2 2007/11/27 15:55:29 art Exp $ */ /* * Copyright (c) 2007 Artur Grabowski <art@openbsd.org> @@ -119,7 +119,8 @@ __mp_unlock(struct __mp_lock *mpl) } int -__mp_release_all(struct __mp_lock *mpl) { +__mp_release_all(struct __mp_lock *mpl) +{ int rv = mpl->mpl_count - 1; long rf = read_rflags(); @@ -139,7 +140,8 @@ __mp_release_all(struct __mp_lock *mpl) { } int -__mp_release_all_but_one(struct __mp_lock *mpl) { +__mp_release_all_but_one(struct __mp_lock *mpl) +{ int rv = mpl->mpl_count - 2; #ifdef MP_LOCKDEBUG @@ -155,13 +157,15 @@ __mp_release_all_but_one(struct __mp_lock *mpl) { } void -__mp_acquire_count(struct __mp_lock *mpl, int count) { +__mp_acquire_count(struct __mp_lock *mpl, int count) +{ while (count--) __mp_lock(mpl); } int -__mp_lock_held(struct __mp_lock *mpl) { +__mp_lock_held(struct __mp_lock *mpl) +{ return mpl->mpl_cpu == curcpu(); } |