cvs commit: src/sys/kern kern_timeout.c src/sys/sys callout.h src/share/man/man9 timeout.9

Nate Lawson nate at root.org
Tue Apr 6 23:22:19 PDT 2004


On Wed, 7 Apr 2004, Colin Percival wrote:
> 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.

Other than me not being familiar with your code, you just confirmed my
point, namely that your reason for not placing the comment above the
entire block instead of within it was a straw man.  I'm fine with the fact
that you don't care about this style aspect.

-Nate


More information about the cvs-src mailing list