@@ -1167,8 +1167,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
1167
1167
1168
1168
/*
1169
1169
* If we detected deadlock, give up without waiting. This must agree with
1170
- * CheckDeadLock's recovery code, except that we shouldn't release the
1171
- * semaphore since we haven't tried to lock it yet.
1170
+ * CheckDeadLock's recovery code.
1172
1171
*/
1173
1172
if (early_deadlock )
1174
1173
{
@@ -1204,9 +1203,9 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
1204
1203
1205
1204
/*
1206
1205
* Set timer so we can wake up after awhile and check for a deadlock. If a
1207
- * deadlock is detected, the handler releases the process's semaphore and
1208
- * sets MyProc->waitStatus = STATUS_ERROR, allowing us to know that we
1209
- * must report failure rather than success.
1206
+ * deadlock is detected, the handler sets MyProc->waitStatus =
1207
+ * STATUS_ERROR, allowing us to know that we must report failure rather
1208
+ * than success.
1210
1209
*
1211
1210
* By delaying the check until we've waited for a bit, we can avoid
1212
1211
* running the rather expensive deadlock-check code in most cases.
@@ -1549,7 +1548,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
1549
1548
1550
1549
1551
1550
/*
1552
- * ProcWakeup -- wake up a process by releasing its private semaphore .
1551
+ * ProcWakeup -- wake up a process by setting its latch .
1553
1552
*
1554
1553
* Also remove the process from the wait queue and set its links invalid.
1555
1554
* RETURN: the next process in the wait queue.
@@ -1684,8 +1683,7 @@ CheckDeadLock(void)
1684
1683
* we know that we don't have to wait anymore.
1685
1684
*
1686
1685
* We check by looking to see if we've been unlinked from the wait queue.
1687
- * This is quicker than checking our semaphore's state, since no kernel
1688
- * call is needed, and it is safe because we hold the lock partition lock.
1686
+ * This is safe because we hold the lock partition lock.
1689
1687
*/
1690
1688
if (MyProc -> links .prev == NULL ||
1691
1689
MyProc -> links .next == NULL )
0 commit comments