aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/ipc
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2024-07-30 21:45:01 +1200
committerThomas Munro <tmunro@postgresql.org>2024-07-30 22:58:37 +1200
commite25626677f8076eb3ce94586136c5464ee154381 (patch)
treef03f87af97b998e2dd5aadcfe8a93a83a1ae716b /src/backend/storage/ipc
parent1330843bb78e9d2422af2f2b9909b80732bd6fc0 (diff)
downloadpostgresql-e25626677f8076eb3ce94586136c5464ee154381.tar.gz
postgresql-e25626677f8076eb3ce94586136c5464ee154381.zip
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
Diffstat (limited to 'src/backend/storage/ipc')
-rw-r--r--src/backend/storage/ipc/ipci.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c
index b6c3b169509..34e4d17b67d 100644
--- a/src/backend/storage/ipc/ipci.c
+++ b/src/backend/storage/ipc/ipci.c
@@ -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());
@@ -226,14 +224,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
*/
InitShmemAllocation();