Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Apr 2004 02:19:13 +0100
From:      Colin Percival <colin.percival@wadham.ox.ac.uk>
To:        Nate Lawson <nate@root.org>
Cc:        Colin Percival <colin.percival@wadham.ox.ac.uk>
Subject:   Re: cvs commit: src/sys/kern kern_timeout.c src/sys/sys  callout.h src/share/man/man9 timeout.9
Message-ID:  <6.0.1.1.1.20040407020834.03e0ae18@imap.sfu.ca>
In-Reply-To: <20040406174517.F30594@root.org>
References:  <20040406230958.C01C616A545@hub.freebsd.org> <20040406162703.H30263@root.org> <6.0.1.1.1.20040407004244.03f85e80@imap.sfu.ca> <20040406174517.F30594@root.org>

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




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