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
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.