mirror of
https://github.com/postgres/postgres.git
synced 2026-02-13 15:53:13 -05:00
This code wanted to ensure that the 'exchange' variable passed to pg_atomic_compare_exchange_u64 has correct alignment, but apparently platforms don't actually require anything that doesn't come naturally. While messing with pg_atomic_monotonic_advance_u64: instead of using Max() to determine the value to return, just use pg_atomic_compare_exchange_u64()'s return value to decide; also, use pg_atomic_compare_exchange_u64 instead of the _impl version; also remove the unnecessary underscore at the end of variable name "target". Backpatch to 17, where this code was introduced by commit bf3ff7bf83bc. Reported-by: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/36796438-a718-cf9b-2071-b2c1b947c1b5@gmail.com |
||
|---|---|---|
| .. | ||
| atomics | ||
| win32 | ||
| win32_msvc | ||
| atomics.h | ||
| cygwin.h | ||
| darwin.h | ||
| freebsd.h | ||
| linux.h | ||
| netbsd.h | ||
| openbsd.h | ||
| pg_bitutils.h | ||
| pg_bswap.h | ||
| pg_crc32c.h | ||
| pg_iovec.h | ||
| pg_lfind.h | ||
| pg_pthread.h | ||
| simd.h | ||
| solaris.h | ||
| win32.h | ||
| win32_port.h | ||
| win32ntdll.h | ||