This is an automated email from the ASF dual-hosted git repository. leborchuk pushed a commit to branch REL_2_STABLE in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit e80d01bca8ea3ba00cf91d8dee27b29ea9a1c32d Author: Nathan Bossart <[email protected]> AuthorDate: Wed Nov 15 15:04:18 2023 -0600 Fix fallback implementation for pg_atomic_test_set_flag(). 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 Freund Discussion: https://postgr.es/m/20231114035439.GA1809032%40nathanxps13 Backpatch-through: 12 (cherry picked from commit a54129e8b6968642fc18cdf61e551d4aa6774ee2) --- src/include/port/atomics/generic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/port/atomics/generic.h b/src/include/port/atomics/generic.h index 6d094dc4a40..05fc2998e98 100644 --- a/src/include/port/atomics/generic.h +++ b/src/include/port/atomics/generic.h @@ -83,7 +83,7 @@ pg_atomic_init_flag_impl(volatile pg_atomic_flag *ptr) 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
