pgsql: Require compiler barrier support.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Require compiler barrier support.
Date: 2024-07-30 11:03:37
Message-ID: E1sYkdl-001sbr-Hg@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Require compiler barrier support.

Previously we had a fallback implementation of pg_compiler_barrier()
that called an empty function across a translation unit boundary so the
compiler couldn't see what it did. That shouldn't be needed on any
current systems, and might not even work with a link time optimizer.
Since we now require compiler-specific knowledge of how to implement
atomics, we should also know how to implement compiler barriers on a
hypothetical new system.

Reviewed-by: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Suggested-by: Andres Freund <andres(at)anarazel(dot)de>
Discussion: https://postgr.es/m/721bf39a-ed8a-44b0-8b8e-be3bd81db748%40technowledgy.de
Discussion: https://postgr.es/m/3351991.1697728588%40sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a011dc399cc82be07326c89c926bd5880160b1ba

Modified Files
--------------
src/backend/port/atomics.c | 8 --------
src/include/port/atomics.h | 3 +++
src/include/port/atomics/fallback.h | 15 ---------------
3 files changed, 3 insertions(+), 23 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-07-30 11:09:42 Re: pgsql: Remove --disable-spinlocks.
Previous Message Peter Eisentraut 2024-07-30 10:34:47 pgsql: pg_createsubscriber: Remove obsolete comment