typo in fallback implementation for pg_atomic_test_set_flag()

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: andres(at)anarazel(dot)de
Subject: typo in fallback implementation for pg_atomic_test_set_flag()
Date: 2023-11-14 03:54:39
Message-ID: 20231114035439.GA1809032@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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

Attachment Content-Type Size
fix_atomic_exchange_typo_v1.patch text/x-diff 517 bytes


Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2023-11-14 04:28:22 Re: trying again to get incremental backup
Previous Message Amit Kapila 2023-11-14 03:54:16 Re: pg_upgrade and logical replication[