pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove --disable-atomics, require 32 bit atomics.
Date: Tue, 30 Jul 2024 11:03:37 +0000
Message-ID: <E1sYkdl-001sbo-H6@gemulon.postgresql.org> (raw)

Remove --disable-atomics, require 32 bit atomics.

Modern versions of all relevant architectures and tool chains have
atomics support.  Since edadeb07, there is no remaining reason to carry
code that simulates atomic flags and uint32 imperfectly with spinlocks.
64 bit atomics are still emulated with spinlocks, if needed, for now.

Any modern compiler capable of implementing C11 <stdatomic.h> must have
the underlying operations we need, though we don't require C11 yet.  We
detect certain compilers and architectures, so hypothetical new systems
might need adjustments here.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> (concept, not the patch)
Reviewed-by: Andres Freund <andres@anarazel.de> (concept, not the patch)
Discussion: https://postgr.es/m/3351991.1697728588%40sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/81385261362962deb9861b39b509aeffe213721d

Modified Files
--------------
configure                                 |  40 -----------
configure.ac                              |  13 ----
doc/src/sgml/installation.sgml            |  25 -------
meson.build                               |  65 ++++++++----------
src/backend/port/atomics.c                | 109 ------------------------------
src/include/pg_config.h.in                |   3 -
src/include/port/atomics.h                |  18 ++---
src/include/port/atomics/arch-x86.h       |   8 ---
src/include/port/atomics/fallback.h       |  87 +-----------------------
src/include/port/atomics/generic-gcc.h    |   4 --
src/include/port/atomics/generic-msvc.h   |   4 --
src/include/port/atomics/generic-sunpro.h |   8 ---
12 files changed, 39 insertions(+), 345 deletions(-)



Message-ID: <E1sYkdl-001sbo-H6@gemulon.postgresql.org>
Permalink:  ../E1sYkdl-001sbo-H6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sYkdl-001sbo-H6@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove --disable-atomics, require 32 bit atomics.
  In-Reply-To: <E1sYkdl-001sbo-H6@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox