From owner-cvs-all@FreeBSD.ORG Tue Apr 6 23:22:18 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 BE63E16A4CE for ; Tue, 6 Apr 2004 23:22:18 -0700 (PDT) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 8003F43D39 for ; Tue, 6 Apr 2004 23:22:18 -0700 (PDT) (envelope-from nate@root.org) Received: (qmail 31902 invoked by uid 1000); 7 Apr 2004 06:20:03 -0000 Date: Tue, 6 Apr 2004 23:20:03 -0700 (PDT) From: Nate Lawson To: Colin Percival In-Reply-To: <6.0.1.1.1.20040407020834.03e0ae18@imap.sfu.ca> Message-ID: <20040406231713.E31878@root.org> References: <20040406230958.C01C616A545@hub.freebsd.org> <20040406162703.H30263@root.org><20040406174517.F30594@root.org> <6.0.1.1.1.20040407020834.03e0ae18@imap.sfu.ca> 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 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 06:22:18 -0000 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