typo in fallback implementation for pg_atomic_test_set_flag()
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: pgsql-hackers@postgresql.org
Cc: andres@anarazel.de
Date: 2023-11-14T03:54:39Z
Lists: pgsql-hackers
Attachments
- fix_atomic_exchange_typo_v1.patch (text/x-diff) patch v1
I noticed that the fallback pg_atomic_test_set_flag_impl() implementation that uses atomic-exchange is giving pg_atomic_exchange_u32_impl() an extra argument. This appears to be copy/pasted from the atomic-compare-exchange version a few lines down. It looks like it's been this way since this code was introduced in commit b64d92f (2014). Patch attached. I'd ordinarily suggest removing this section of code since it doesn't seem to have gotten much coverage, but I'm actually looking into adding some faster atomic-exchange implementations that may activate this code for certain compiler/architecture combinations. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
-
Fix fallback implementation for pg_atomic_test_set_flag().
- c23677844c96 12.18 landed
- 231a445ea31d 13.14 landed
- a54129e8b696 14.11 landed
- 18f47989ecb0 15.6 landed
- 2927b1dca7ae 16.2 landed
- 69c32b8b3535 17.0 landed
-
Add a basic atomic ops API abstracting away platform/architecture details.
- b64d92f1a560 9.5.0 cited