@@ -1179,8 +1179,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
1179
1179
1180
1180
/*
1181
1181
* If we detected deadlock, give up without waiting. This must agree with
1182
- * CheckDeadLock's recovery code, except that we shouldn't release the
1183
- * semaphore since we haven't tried to lock it yet.
1182
+ * CheckDeadLock's recovery code.
1184
1183
*/
1185
1184
if (early_deadlock )
1186
1185
{
@@ -1216,9 +1215,9 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
1216
1215
1217
1216
/*
1218
1217
* Set timer so we can wake up after awhile and check for a deadlock. If a
1219
- * deadlock is detected, the handler releases the process's semaphore and
1220
- * sets MyProc->waitStatus = STATUS_ERROR, allowing us to know that we
1221
- * must report failure rather than success.
1218
+ * deadlock is detected, the handler sets MyProc->waitStatus =
1219
+ * STATUS_ERROR, allowing us to know that we must report failure rather
1220
+ * than success.
1222
1221
*
1223
1222
* By delaying the check until we've waited for a bit, we can avoid
1224
1223
* running the rather expensive deadlock-check code in most cases.
@@ -1561,7 +1560,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
1561
1560
1562
1561
1563
1562
/*
1564
- * ProcWakeup -- wake up a process by releasing its private semaphore .
1563
+ * ProcWakeup -- wake up a process by setting its latch .
1565
1564
*
1566
1565
* Also remove the process from the wait queue and set its links invalid.
1567
1566
* RETURN: the next process in the wait queue.
@@ -1696,8 +1695,7 @@ CheckDeadLock(void)
1696
1695
* we know that we don't have to wait anymore.
1697
1696
*
1698
1697
* We check by looking to see if we've been unlinked from the wait queue.
1699
- * This is quicker than checking our semaphore's state, since no kernel
1700
- * call is needed, and it is safe because we hold the lock partition lock.
1698
+ * This is safe because we hold the lock partition lock.
1701
1699
*/
1702
1700
if (MyProc -> links .prev == NULL ||
1703
1701
MyProc -> links .next == NULL )
0 commit comments