@@ -1167,8 +1167,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
11671167
11681168 /*
11691169 * 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.
11721171 */
11731172 if (early_deadlock )
11741173 {
@@ -1204,9 +1203,9 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
12041203
12051204 /*
12061205 * 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.
12101209 *
12111210 * By delaying the check until we've waited for a bit, we can avoid
12121211 * running the rather expensive deadlock-check code in most cases.
@@ -1549,7 +1548,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
15491548
15501549
15511550/*
1552- * ProcWakeup -- wake up a process by releasing its private semaphore .
1551+ * ProcWakeup -- wake up a process by setting its latch .
15531552 *
15541553 * Also remove the process from the wait queue and set its links invalid.
15551554 * RETURN: the next process in the wait queue.
@@ -1684,8 +1683,7 @@ CheckDeadLock(void)
16841683 * we know that we don't have to wait anymore.
16851684 *
16861685 * 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.
16891687 */
16901688 if (MyProc -> links .prev == NULL ||
16911689 MyProc -> links .next == NULL )
0 commit comments