@@ -1196,8 +1196,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
11961196
11971197 /*
11981198 * If we detected deadlock, give up without waiting. This must agree with
1199- * CheckDeadLock's recovery code, except that we shouldn't release the
1200- * semaphore since we haven't tried to lock it yet.
1199+ * CheckDeadLock's recovery code.
12011200 */
12021201 if (early_deadlock )
12031202 {
@@ -1233,9 +1232,9 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
12331232
12341233 /*
12351234 * Set timer so we can wake up after awhile and check for a deadlock. If a
1236- * deadlock is detected, the handler releases the process's semaphore and
1237- * sets MyProc->waitStatus = STATUS_ERROR, allowing us to know that we
1238- * must report failure rather than success.
1235+ * deadlock is detected, the handler sets MyProc->waitStatus =
1236+ * STATUS_ERROR, allowing us to know that we must report failure rather
1237+ * than success.
12391238 *
12401239 * By delaying the check until we've waited for a bit, we can avoid
12411240 * running the rather expensive deadlock-check code in most cases.
@@ -1578,7 +1577,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
15781577
15791578
15801579/*
1581- * ProcWakeup -- wake up a process by releasing its private semaphore .
1580+ * ProcWakeup -- wake up a process by setting its latch .
15821581 *
15831582 * Also remove the process from the wait queue and set its links invalid.
15841583 * RETURN: the next process in the wait queue.
@@ -1713,8 +1712,7 @@ CheckDeadLock(void)
17131712 * we know that we don't have to wait anymore.
17141713 *
17151714 * We check by looking to see if we've been unlinked from the wait queue.
1716- * This is quicker than checking our semaphore's state, since no kernel
1717- * call is needed, and it is safe because we hold the lock partition lock.
1715+ * This is safe because we hold the lock partition lock.
17181716 */
17191717 if (MyProc -> links .prev == NULL ||
17201718 MyProc -> links .next == NULL )
0 commit comments