postgresql/src/include/storage
Tom Lane 1c72d82c25 Allow use of __sync_lock_test_and_set for spinlocks on any machine.
If we have no special-case code in s_lock.h for the current platform,
but the compiler has __sync_lock_test_and_set, use that instead of
failing.  It's unlikely that anybody's __sync_lock_test_and_set
would be so awful as to be worse than our semaphore-based fallback,
but if it is, they can (continue to) use --disable-spinlocks.

This allows removal of the RISC-V special case installed by commit
c32fcac56, which generated exactly the same code but only on that
platform.  Usefully, the RISC-V buildfarm animals should now test
at least the int variant of this patch.

I've manually tested both variants on ARM by dint of removing the
ARM-specific stanza.  We don't want to drop that, because it already
has some special knowledge and is likely to grow more over time.
Likewise, this is not meant to preclude installing special cases
for other arches if that proves worthwhile.

Per discussion of a request to install the same code for loongarch64.
Like the previous patch, we might as well back-patch to supported
branches.

Discussion: https://postgr.es/m/761ac43d44b84d679ba803c2bd947cc0@HSMAILSVR04.hs.handsome.com.cn
2022-11-02 17:37:29 -04:00
..
.gitignore When trace_lwlocks is used, identify individual lwlocks by name. 2015-09-11 14:01:39 -04:00
backendid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
barrier.h Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
block.h Convert macros to static inline functions (block.h) 2022-07-07 08:36:51 +02:00
buf.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
buf_internals.h Revert 56-bit relfilenode change and follow-up commits. 2022-09-28 09:55:28 -04:00
buffile.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
bufmgr.h Clean up some inconsistencies with GUC declarations 2022-10-31 12:44:48 +09:00
bufpage.h Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
checksum.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
checksum_impl.h Convert macros to static inline functions (bufpage.h) 2022-07-11 07:21:52 +02:00
condition_variable.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
copydir.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dsm.h Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
dsm_impl.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
fd.h Move pg_pwritev_with_retry() to src/common/file_utils.c 2022-10-27 14:39:42 +09:00
fileset.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
freespace.h Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
fsm_internals.h Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
indexfsm.h Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
ipc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
item.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
itemid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
itemptr.h Convert macros to static inline functions (itemptr.h) 2022-07-13 14:47:36 +02:00
large_object.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
latch.h Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
lmgr.h Add new block-by-block strategy for CREATE DATABASE. 2022-03-29 11:48:36 -04:00
lock.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
lockdefs.h Add missing space in comments. 2022-07-21 16:25:07 +05:30
lwlock.h Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
md.h Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
off.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_sema.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_shmem.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
pmsignal.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
predicate.h Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
predicate_internals.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
proc.h Fix some comments in proc.h 2022-10-15 12:22:29 +09:00
procarray.h Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
proclist.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
proclist_types.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
procsignal.h Fix DROP {DATABASE,TABLESPACE} on Windows. 2022-02-12 10:21:23 +13:00
reinit.h Clean up some residual confusion between OIDs and RelFileNumbers. 2022-07-28 10:20:29 -04:00
relfilelocator.h Revert 56-bit relfilenode change and follow-up commits. 2022-09-28 09:55:28 -04:00
s_lock.h Allow use of __sync_lock_test_and_set for spinlocks on any machine. 2022-11-02 17:37:29 -04:00
sharedfileset.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
shm_mq.h shm_mq_sendv: Fix flushing bug when receiver not yet attached. 2022-05-31 08:46:54 -04:00
shm_toc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
shmem.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
sinval.h Revert 56-bit relfilenode change and follow-up commits. 2022-09-28 09:55:28 -04:00
sinvaladt.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
smgr.h Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
spin.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
standby.h Harmonize parameter names in storage and AM code. 2022-09-19 19:18:36 -07:00
standbydefs.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
sync.h Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00