The fallback implementation of pg_atomic_test_set_flag() that uses
atomic-exchange gives pg_atomic_exchange_u32_impl() an extra
argument. This issue has been present since the introduction of
the atomics API in commit
b64d92f1a5.
Reviewed-by: Andres FreundDiscussion: https://postgr.es/m/
20231114035439.GA1809032%40nathanxps13
Back-through: 12
static inline bool
pg_atomic_test_set_flag_impl(volatile pg_atomic_flag *ptr)
{
- return pg_atomic_exchange_u32_impl(ptr, &value, 1) == 0;
+ return pg_atomic_exchange_u32_impl(ptr, 1) == 0;
}
#define PG_HAVE_ATOMIC_UNLOCKED_TEST_FLAG