diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-09-20 19:19:04 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-09-20 19:19:04 +0000 |
commit | ac80b6591c6b0cedf6fdac35db003472a6c15307 (patch) | |
tree | 1713ff1de28368fae2eb19c6df0beeebe95a1b17 /sys/arch | |
parent | a61744c3f667fe23875c62fcaba844eeb921d2db (diff) |
Put memory barriers in the appropriate place.
Discssed with geunther@, tested by landry@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa/hppa/mutex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/hppa/hppa/mutex.c b/sys/arch/hppa/hppa/mutex.c index 81721865a1d..160337c1aa7 100644 --- a/sys/arch/hppa/hppa/mutex.c +++ b/sys/arch/hppa/hppa/mutex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mutex.c,v 1.14 2015/05/02 10:59:47 dlg Exp $ */ +/* $OpenBSD: mutex.c,v 1.15 2015/09/20 19:19:03 kettenis Exp $ */ /* * Copyright (c) 2004 Artur Grabowski <art@openbsd.org> @@ -86,13 +86,13 @@ mtx_enter_try(struct mutex *mtx) ); if (ret) { + membar_enter(); mtx->mtx_owner = ci; if (mtx->mtx_wantipl != IPL_NONE) mtx->mtx_oldipl = s; #ifdef DIAGNOSTIC ci->ci_mutex_level++; #endif - membar_enter(); return (1); } @@ -147,8 +147,8 @@ mtx_leave(struct mutex *mtx) s = mtx->mtx_oldipl; mtx->mtx_owner = NULL; #ifdef MULTIPROCESSOR - *lock = 1; membar_exit(); + *lock = 1; #endif if (mtx->mtx_wantipl != IPL_NONE) |