mirror of
https://github.com/postgres/postgres.git
synced 2025-11-28 11:44:57 +03:00
Rename WAIT_* constants to PG_WAIT_*.
Windows apparently has a constant named WAIT_TIMEOUT, and some of these other names are pretty generic, too. Insert "PG_" at the front of each name in order to disambiguate. Michael Paquier
This commit is contained in:
@@ -3646,7 +3646,7 @@ LockBufferForCleanup(Buffer buffer)
|
||||
SetStartupBufferPinWaitBufId(-1);
|
||||
}
|
||||
else
|
||||
ProcWaitForSignal(WAIT_BUFFER_PIN);
|
||||
ProcWaitForSignal(PG_WAIT_BUFFER_PIN);
|
||||
|
||||
/*
|
||||
* Remove flag marking us as waiter. Normally this will not be set
|
||||
|
||||
@@ -390,7 +390,7 @@ ResolveRecoveryConflictWithLock(LOCKTAG locktag)
|
||||
}
|
||||
|
||||
/* Wait to be signaled by the release of the Relation Lock */
|
||||
ProcWaitForSignal(WAIT_LOCK | locktag.locktag_type);
|
||||
ProcWaitForSignal(PG_WAIT_LOCK | locktag.locktag_type);
|
||||
|
||||
/*
|
||||
* Clear any timeout requests established above. We assume here that the
|
||||
@@ -470,7 +470,7 @@ ResolveRecoveryConflictWithBufferPin(void)
|
||||
}
|
||||
|
||||
/* Wait to be signaled by UnpinBuffer() */
|
||||
ProcWaitForSignal(WAIT_BUFFER_PIN);
|
||||
ProcWaitForSignal(PG_WAIT_BUFFER_PIN);
|
||||
|
||||
/*
|
||||
* Clear any timeout requests established above. We assume here that the
|
||||
|
||||
@@ -732,9 +732,9 @@ LWLockReportWaitStart(LWLock *lock)
|
||||
int lockId = T_ID(lock);
|
||||
|
||||
if (lock->tranche == 0)
|
||||
pgstat_report_wait_start(WAIT_LWLOCK_NAMED | (uint16) lockId);
|
||||
pgstat_report_wait_start(PG_WAIT_LWLOCK_NAMED | (uint16) lockId);
|
||||
else
|
||||
pgstat_report_wait_start(WAIT_LWLOCK_TRANCHE | lock->tranche);
|
||||
pgstat_report_wait_start(PG_WAIT_LWLOCK_TRANCHE | lock->tranche);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -752,10 +752,10 @@ LWLockReportWaitEnd(void)
|
||||
const char *
|
||||
GetLWLockIdentifier(uint32 classId, uint16 eventId)
|
||||
{
|
||||
if (classId == WAIT_LWLOCK_NAMED)
|
||||
if (classId == PG_WAIT_LWLOCK_NAMED)
|
||||
return MainLWLockNames[eventId];
|
||||
|
||||
Assert(classId == WAIT_LWLOCK_TRANCHE);
|
||||
Assert(classId == PG_WAIT_LWLOCK_TRANCHE);
|
||||
|
||||
/*
|
||||
* It is quite possible that user has registered tranche in one of the
|
||||
|
||||
@@ -1214,7 +1214,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
|
||||
else
|
||||
{
|
||||
WaitLatch(MyLatch, WL_LATCH_SET, 0,
|
||||
WAIT_LOCK | locallock->tag.lock.locktag_type);
|
||||
PG_WAIT_LOCK | locallock->tag.lock.locktag_type);
|
||||
ResetLatch(MyLatch);
|
||||
/* check for deadlocks first, as that's probably log-worthy */
|
||||
if (got_deadlock_timeout)
|
||||
|
||||
Reference in New Issue
Block a user