]> granicus.if.org Git - postgresql/commit
Improve 64bit atomics support.
authorAndres Freund <andres@anarazel.de>
Fri, 7 Apr 2017 21:44:47 +0000 (14:44 -0700)
committerAndres Freund <andres@anarazel.de>
Fri, 7 Apr 2017 21:48:11 +0000 (14:48 -0700)
commite8fdbd58fe564a29977f4331cd26f9697d76fc40
tree7ac78010b4ad51730fe948a79e7c5d7e5f461981
parent28afad5c85b436f19d9f2c0e3197c7db960fef6f
Improve 64bit atomics support.

When adding atomics back in b64d92f1a, I added 64bit support as
optional; there wasn't yet a direct user in sight.  That turned out to
be a bit short-sighted, it'd already have been useful a number of times.

Add a fallback implementation of 64bit atomics, just like the one we
have for 32bit atomics.

Additionally optimize reads/writes to 64bit on a number of platforms
where aligned writes of that size are atomic. This can now be tested
with PG_HAVE_8BYTE_SINGLE_COPY_ATOMICITY.

Author: Andres Freund
Reviewed-By: Amit Kapila
Discussion: https://postgr.es/m/20160330230914.GH13305@awork2.anarazel.de
src/backend/port/atomics.c
src/include/port/atomics.h
src/include/port/atomics/arch-ia64.h
src/include/port/atomics/arch-ppc.h
src/include/port/atomics/arch-x86.h
src/include/port/atomics/fallback.h
src/include/port/atomics/generic.h
src/test/regress/regress.c