Thread: pgsql: Require memory barrier support.

pgsql: Require memory barrier support.

From
Thomas Munro
Date:
Require memory barrier support.

Previously we had a fallback implementation that made a harmless system
call, based on the assumption that system calls must contain a memory
barrier.  That shouldn't be reached on any current system, and it seems
highly likely that we can easily find out how to request explicit memory
barriers, if we've already had to find out how to do atomics on a
hypothetical new system.

Removed comments and a function name referred to a spinlock used for
fallback memory barriers, but that changed in 1b468a13, which left some
misleading words behind in a few places.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Suggested-by: Andres Freund <andres@anarazel.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/83aadbeb96f019fff88e6a06615fe0a86c6956ca

Modified Files
--------------
src/backend/port/atomics.c          | 23 -----------------------
src/include/port/atomics.h          |  4 ++++
src/include/port/atomics/fallback.h | 16 ----------------
src/include/port/atomics/generic.h  | 10 ----------
4 files changed, 4 insertions(+), 49 deletions(-)