cvs commit: src/sys/kern kern_timeout.c src/sys/sys
callout.h src/share/man/man9 timeout.9
Colin Percival
colin.percival at wadham.ox.ac.uk
Tue Apr 6 18:25:50 PDT 2004
At 01:54 07/04/2004, Nate Lawson wrote:
>Nope, you've already included the check in your text so it can move as-is.
>Consider this example:
>
>+ if (wakeup_needed) {
>+ /*
>+ * There might be someone waiting
>+ * for the callout to complete.
>+ */
>
>wakeup_needed being non-zero means there is someone waiting for the
>callout to complete.
No. I wrote that comment very carefully; wakeup_needed being nonzero
means that there *might* be someone waiting for the callout to complete.
It's possible that the thread which wants to wait hasn't actually reached
cv_wait() yet -- thus the games with wakeup_ctr, wakeup_done_ctr, and
wakeup_cookie.
Colin Percival
More information about the cvs-src
mailing list