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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user