1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-29 15:58:33 +03:00
Files
postgres/src/include
Nathan Bossart d9b5a63f49 Better express platform requirements in s_lock.h.
Presently, s_lock.h insists that every platform provide TAS(), and
its header comment doesn't say which of the macros a new platform
actually needs to supply.  The real contract is that a platform
must provide either S_LOCK() or a TAS() for the default S_LOCK() to
be built on.

To better express that, this commit moves the "no spinlock support"
error to where the default S_LOCK() is defined, compiles s_lock()
only when the default S_LOCK() is in use, and provides a default
TAS_SPIN() only when there is a TAS() to base it on.  The direct
callers of s_lock() in the spinlock tests are adjusted to match.
The header comment is reworked accordingly, dropping the note about
pre-9.5 volatile requirements and the caution about TAS()
spuriously failing along the way.

Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/afkUeI7UhacZ5ZFm%40nathan
2026-09-28 13:52:42 -05:00
..
2026-01-01 13:24:10 -05:00
2026-01-01 13:24:10 -05:00
2026-09-08 08:49:30 +02:00
2026-09-17 16:50:44 +09:00
2026-01-01 13:24:10 -05:00
2026-07-13 11:06:03 +02:00
2026-07-25 19:16:42 +02:00
2026-09-28 10:02:20 +02:00
2026-03-30 16:12:08 -05:00
2026-01-01 13:24:10 -05:00
2026-01-01 13:24:10 -05:00
2026-01-01 13:24:10 -05:00
2026-01-01 13:24:10 -05:00
2026-01-01 13:24:10 -05:00
2026-07-13 11:06:03 +02:00
2026-01-01 13:24:10 -05:00
2026-01-01 13:24:10 -05:00