From owner-cvs-all@FreeBSD.ORG Tue Apr 6 18:25:50 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E6E016A4CF for ; Tue, 6 Apr 2004 18:25:50 -0700 (PDT) Received: from tx0.oucs.ox.ac.uk (tx0.oucs.ox.ac.uk [129.67.1.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 162E143D41 for ; Tue, 6 Apr 2004 18:25:50 -0700 (PDT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan0.oucs.ox.ac.uk ([129.67.1.162] helo=localhost) by tx0.oucs.ox.ac.uk with esmtp (Exim 4.24) id 1BB1ni-0001Xh-Dy for cvs-all@FreeBSD.org; Wed, 07 Apr 2004 02:24:22 +0100 Received: from rx0.oucs.ox.ac.uk ([129.67.1.161]) by localhost (scan0.oucs.ox.ac.uk [129.67.1.162]) (amavisd-new, port 25) with ESMTP id 05818-02 for ; Wed, 7 Apr 2004 02:24:22 +0100 (BST) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx0.oucs.ox.ac.uk with smtp (Exim 4.24) id 1BB1ni-0001Xc-0X for cvs-all@FreeBSD.org; Wed, 07 Apr 2004 02:24:22 +0100 Received: (qmail 30248 invoked by uid 1004); 7 Apr 2004 01:24:22 -0000 Received: from colin.percival@wadham.ox.ac.uk by gateway by uid 71 with qmail-scanner-1.20 (clamscan: 0.67. sweep: 2.18/3.79. Clear:RC:1(163.1.161.131):. Processed in 0.104639 secs); 07 Apr 2004 01:24:22 -0000 Received: from dhcp1131.wadham.ox.ac.uk (HELO piii600.wadham.ox.ac.uk) (163.1.161.131) by gateway.wadham.ox.ac.uk with SMTP; 7 Apr 2004 01:24:21 -0000 Message-Id: <6.0.1.1.1.20040407020834.03e0ae18@imap.sfu.ca> X-Sender: cperciva@imap.sfu.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Wed, 07 Apr 2004 02:19:13 +0100 To: Nate Lawson From: Colin Percival 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Colin Percival Subject: Re: cvs commit: src/sys/kern kern_timeout.c src/sys/sys callout.h src/share/man/man9 timeout.9 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 01:25:50 -0000 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