mirror of
https://github.com/postgres/postgres.git
synced 2025-09-06 13:46:51 +03:00
Remove the option to service interrupts during PGSemaphoreLock().
The remaining caller (lwlocks) doesn't need that facility, and we plan to remove ImmedidateInterruptOK entirely. That means that interrupts can't be serviced race-free and portably anyway, so there's little reason for keeping the feature. Reviewed-By: Heikki Linnakangas
This commit is contained in:
@@ -863,8 +863,7 @@ LWLockDequeueSelf(LWLock *lock)
|
||||
*/
|
||||
for (;;)
|
||||
{
|
||||
/* "false" means cannot accept cancel/die interrupt here. */
|
||||
PGSemaphoreLock(&MyProc->sem, false);
|
||||
PGSemaphoreLock(&MyProc->sem);
|
||||
if (!MyProc->lwWaiting)
|
||||
break;
|
||||
extraWaits++;
|
||||
@@ -1034,8 +1033,7 @@ LWLockAcquireCommon(LWLock *lock, LWLockMode mode, uint64 *valptr, uint64 val)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
/* "false" means cannot accept cancel/die interrupt here. */
|
||||
PGSemaphoreLock(&proc->sem, false);
|
||||
PGSemaphoreLock(&proc->sem);
|
||||
if (!proc->lwWaiting)
|
||||
break;
|
||||
extraWaits++;
|
||||
@@ -1195,8 +1193,7 @@ LWLockAcquireOrWait(LWLock *lock, LWLockMode mode)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
/* "false" means cannot accept cancel/die interrupt here. */
|
||||
PGSemaphoreLock(&proc->sem, false);
|
||||
PGSemaphoreLock(&proc->sem);
|
||||
if (!proc->lwWaiting)
|
||||
break;
|
||||
extraWaits++;
|
||||
@@ -1397,8 +1394,7 @@ LWLockWaitForVar(LWLock *lock, uint64 *valptr, uint64 oldval, uint64 *newval)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
/* "false" means cannot accept cancel/die interrupt here. */
|
||||
PGSemaphoreLock(&proc->sem, false);
|
||||
PGSemaphoreLock(&proc->sem);
|
||||
if (!proc->lwWaiting)
|
||||
break;
|
||||
extraWaits++;
|
||||
|
Reference in New Issue
Block a user