From owner-cvs-all@FreeBSD.ORG Fri Feb 23 22:04:38 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 926BD16A403 for ; Fri, 23 Feb 2007 22:04:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 3A96413C4D5 for ; Fri, 23 Feb 2007 22:04:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l1NM4Zou017056; Fri, 23 Feb 2007 17:04:36 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: John E Hein Date: Fri, 23 Feb 2007 17:05:05 -0500 User-Agent: KMail/1.9.1 References: <200702231625.l1NGP86A029885@repoman.freebsd.org> <17887.20595.540648.699149@gromit.timing.com> In-Reply-To: <17887.20595.540648.699149@gromit.timing.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702231705.05492.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 23 Feb 2007 17:04:36 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2632/Fri Feb 23 14:43:01 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/compat/ndis kern_ndis.c src/sys/dev/acpica/Osd OsdSchedule.c src/sys/dev/ata ata-all.c atapi-cd.c atapi-tape.c src/sys/dev/ppc ppc.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 23 Feb 2007 22:04:38 -0000 On Friday 23 February 2007 15:37, John E Hein wrote: > John Baldwin wrote at 16:25 +0000 on Feb 23, 2007: > > jhb 2007-02-23 16:25:08 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/compat/ndis kern_ndis.c > > sys/dev/acpica/Osd OsdSchedule.c > > sys/dev/ata ata-all.c atapi-cd.c atapi-tape.c > > sys/dev/ppc ppc.c > > Log: > > Use 'pause' in several places rather than trying to tsleep() on NULL (which > > triggers a KASSERT) or local variables. In the case of kern_ndis, the > > tsleep() actually used a common sleep address (curproc) making it > > susceptible to a premature wakeup. > > Nice. Maybe you should pass in priority so pause(9) users don't > always wake up at PRI_MIN. Right now they wakeup at whatever they were when they weng to sleep (passing 0 to tsleep() results in no priority change). This way, pause() doesn't affect your priority at all. > If not, PZERO might be a more sensible default perhaps. > > PCATCH complicates this slightly since pause(9) currently returns > nothing, but I could see cases where users might want PCATCH. If people want to catch signals they can use tsleep() directly, but this intended for saying "I want to wait 100ms for the hardware to settle, but don't want to hog the CPU while I do it", and those places don't use PCATCH now. -- John Baldwin