From owner-freebsd-current@FreeBSD.ORG Mon Jul 26 22:42:22 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B43716A556 for ; Mon, 26 Jul 2004 22:42:22 +0000 (GMT) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21E1943D45 for ; Mon, 26 Jul 2004 22:42:22 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 3495 invoked from network); 26 Jul 2004 22:42:21 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail2.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 26 Jul 2004 22:42:21 -0000 Received: from hydrogen.funkthat.com (lclejq@localhost.funkthat.com [127.0.0.1])i6QMgLuU081428; Mon, 26 Jul 2004 15:42:21 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i6QMgL3S081427; Mon, 26 Jul 2004 15:42:21 -0700 (PDT) Date: Mon, 26 Jul 2004 15:42:20 -0700 From: John-Mark Gurney To: "Conrad J. Sabatier" Message-ID: <20040726224220.GM991@funkthat.com> Mail-Followup-To: "Conrad J. Sabatier" , freebsd-current@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-current@freebsd.org Subject: Re: Questionable code in sys/dev/sound/pcm/channel.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2004 22:42:22 -0000 Conrad J. Sabatier wrote this message on Mon, Jul 26, 2004 at 16:35 -0500: > if (timeout < 1) > timeout = 1; > timeout = 1; > > Why the formulaic calculation of timeout, if it's simply going to be > unconditionally set to 1 immediately afterwards anyway? What's going on > here? Well, if you look at the annotations, that absolute set of timeout was added in rev 1.65 by cg with the comment: tweaks to reduce latency/pauses in output > Also, at the end of the function: > > if (count <= 0) { > c->flags |= CHN_F_DEAD; > printf("%s: play interrupt timeout, channel dead\n", c->name); > } > > return ret; > } that was changed in rev1.52 (by cg also), and previously was just a check for count == 0.. So, I'd recommend a message off to cg and ask why he made this changes... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."