Remove --disable-atomics, require 32 bit atomics.
authorThomas Munro <tmunro@postgresql.org>
Tue, 30 Jul 2024 09:52:46 +0000 (21:52 +1200)
committerThomas Munro <tmunro@postgresql.org>
Tue, 30 Jul 2024 10:58:57 +0000 (22:58 +1200)
commit81385261362962deb9861b39b509aeffe213721d
treecf15fa763cea6ccbc200c5e60759a3688dfba118
parente25626677f8076eb3ce94586136c5464ee154381
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
12 files changed:
configure
configure.ac
doc/src/sgml/installation.sgml
meson.build
src/backend/port/atomics.c
src/include/pg_config.h.in
src/include/port/atomics.h
src/include/port/atomics/arch-x86.h
src/include/port/atomics/fallback.h
src/include/port/atomics/generic-gcc.h
src/include/port/atomics/generic-msvc.h
src/include/port/atomics/generic-sunpro.h