git: ec7b80ade997 - stable/12 - powerpc/atomic: Fix atomic_cmpset_rel()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 07 Oct 2021 03:28:12 UTC
The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ec7b80ade997c5011bc1f1ccd5a74384b70239f2 commit ec7b80ade997c5011bc1f1ccd5a74384b70239f2 Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2019-10-15 03:37:21 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2021-10-07 03:27:26 +0000 powerpc/atomic: Fix atomic_cmpset_rel() Need a release barrier, not an acquire barrier, else bad things happen. (cherry picked from commit 9551397f51a7041dd0060bae1433d0e802373e35) --- sys/powerpc/include/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index c72639811e39..788e7520d7bc 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -686,7 +686,7 @@ atomic_cmpset_long(volatile u_long* p, u_long cmpval, u_long newval) atomic_cmpset_rel_##type(volatile u_##type *p, \ u_##type cmpval, u_##type newval)\ {\ - __ATOMIC_ACQ();\ + __ATOMIC_REL();\ return (atomic_cmpset_##type(p, cmpval, newval));\ }\ struct hack