Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Apr 2004 23:20:03 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        Colin Percival <colin.percival@wadham.ox.ac.uk>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_timeout.c src/sys/sys   callout.h src/share/man/man9 timeout.9
Message-ID:  <20040406231713.E31878@root.org>
In-Reply-To: <6.0.1.1.1.20040407020834.03e0ae18@imap.sfu.ca>
References:  <20040406230958.C01C616A545@hub.freebsd.org> <20040406162703.H30263@root.org><20040406174517.F30594@root.org> <6.0.1.1.1.20040407020834.03e0ae18@imap.sfu.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040406231713.E31878>