1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-18 02:02:55 +03:00

Remove --disable-spinlocks.

A later change will require atomic support, so it wouldn't make sense
for a hypothetical new system not to be able to implement spinlocks.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> (concept, not the patch)
Reviewed-by: Andres Freund <andres@anarazel.de> (concept, not the patch)
Discussion: https://postgr.es/m/3351991.1697728588%40sss.pgh.pa.us
This commit is contained in:
Thomas Munro
2024-07-30 21:45:01 +12:00
parent 1330843bb7
commit e25626677f
20 changed files with 13 additions and 486 deletions

View File

@@ -94,7 +94,6 @@ CalculateShmemSize(int *num_semaphores)
/* Compute number of semaphores we'll need */
numSemas = ProcGlobalSemas();
numSemas += SpinlockSemas();
/* Return the number of semaphores if requested by the caller */
if (num_semaphores)
@@ -111,7 +110,6 @@ CalculateShmemSize(int *num_semaphores)
*/
size = 100000;
size = add_size(size, PGSemaphoreShmemSize(numSemas));
size = add_size(size, SpinlockSemaSize());
size = add_size(size, hash_estimate_size(SHMEM_INDEX_SIZE,
sizeof(ShmemIndexEnt)));
size = add_size(size, dsm_estimate_size());
@@ -225,14 +223,6 @@ CreateSharedMemoryAndSemaphores(void)
*/
PGReserveSemaphores(numSemas);
/*
* If spinlocks are disabled, initialize emulation layer (which depends on
* semaphores, so the order is important here).
*/
#ifndef HAVE_SPINLOCKS
SpinlockSemaInit();
#endif
/*
* Set up shared memory allocation mechanism
*/