svn commit: r331441 - head/sys/mips/mips
Olivier Houchard
cognet at FreeBSD.org
Fri Mar 23 17:25:19 UTC 2018
Author: cognet
Date: Fri Mar 23 17:25:19 2018
New Revision: 331441
URL: https://svnweb.freebsd.org/changeset/base/331441
Log:
In __sync_bool_compare_and_swap(), return true if the returned value is the
same as the expected one, not the desired one.
Pointy hat to: cognet
MFC after: 3 days
Modified:
head/sys/mips/mips/stdatomic.c
Modified: head/sys/mips/mips/stdatomic.c
==============================================================================
--- head/sys/mips/mips/stdatomic.c Fri Mar 23 17:22:28 2018 (r331440)
+++ head/sys/mips/mips/stdatomic.c Fri Mar 23 17:25:19 2018 (r331441)
@@ -327,7 +327,7 @@ __sync_bool_compare_and_swap_4(uint32_t *mem, uint32_t
{
return (do_compare_and_swap_4(mem, expected, desired) ==
- desired);
+ expected);
}
#define EMIT_FETCH_AND_OP_4(name, op) \
More information about the svn-src-all
mailing list