summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-12-20 11:22:30 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-12-20 11:22:30 +0000
commitb0af161c7b32253d9c8bf4ea7e05b95dd5e8510b (patch)
tree4471eb567b6fb006e5ce49d425e73cf476c36533 /sys/arch/mips64
parent34898c4359761d67913cffa0b5b4f000b7956e6b (diff)
Sync C mutex implementations.
ok kettenis@
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/mips64/mutex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/mutex.c b/sys/arch/mips64/mips64/mutex.c
index 69d22a0b30e..14b8341b4fd 100644
--- a/sys/arch/mips64/mips64/mutex.c
+++ b/sys/arch/mips64/mips64/mutex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mutex.c,v 1.7 2017/09/11 09:52:15 mpi Exp $ */
+/* $OpenBSD: mutex.c,v 1.8 2017/12/20 11:22:29 mpi Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
@@ -87,7 +87,7 @@ __mtx_enter_try(struct mutex *mtx)
panic("mtx %p: locking against myself", mtx);
#endif
if (owner == NULL) {
- membar_enter();
+ membar_enter_after_atomic();
if (mtx->mtx_wantipl != IPL_NONE)
mtx->mtx_oldipl = s;
#ifdef DIAGNOSTIC
@@ -143,7 +143,7 @@ __mtx_leave(struct mutex *mtx)
s = mtx->mtx_oldipl;
#ifdef MULTIPROCESSOR
- membar_exit();
+ membar_exit_before_atomic();
#endif
mtx->mtx_owner = NULL;
if (mtx->mtx_wantipl != IPL_NONE)