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
This commit is contained in:
cognet 2018-03-23 17:25:19 +00:00
parent 2252246dd9
commit 2f2c04ea61

View File

@ -327,7 +327,7 @@ __sync_bool_compare_and_swap_4(uint32_t *mem, uint32_t expected,
{
return (do_compare_and_swap_4(mem, expected, desired) ==
desired);
expected);
}
#define EMIT_FETCH_AND_OP_4(name, op) \