mirror of
https://github.com/postgres/postgres.git
synced 2025-12-17 00:03:29 -05:00
Add comment to explain why PGReserveSemaphores() is called early
Before commit e25626677f, PGReserveSemaphores() had to be called before SpinlockSemaInit() because spinlocks were implemented using semaphores on some platforms (--disable-spinlocks). Add a comment explaining that. Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Discussion: https://www.postgresql.org/message-id/CAExHW5seSZpPx-znjidVZNzdagGHOk06F+Ds88MpPUbxd1kTaA@mail.gmail.com Backpatch-to: 18
This commit is contained in:
parent
150e24501b
commit
daf3d99d2b
@ -227,7 +227,9 @@ CreateSharedMemoryAndSemaphores(void)
|
||||
InitShmemAccess(seghdr);
|
||||
|
||||
/*
|
||||
* Create semaphores
|
||||
* Create semaphores. (This is done here for historical reasons. We used
|
||||
* to support emulating spinlocks with semaphores, which required
|
||||
* initializing semaphores early.)
|
||||
*/
|
||||
PGReserveSemaphores(numSemas);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user