From owner-freebsd-current@FreeBSD.ORG Fri Aug 20 13:50:55 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 9D3DC16A4CE; Fri, 20 Aug 2004 13:50:55 +0000 (GMT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BEAF43D5E; Fri, 20 Aug 2004 13:50:55 +0000 (GMT) (envelope-from des@des.no) Received: from dwp.des.no (37.80-203-228.nextgentel.com [80.203.228.37]) by mail.broadpark.no (Postfix) with ESMTP id 8C3CE29ED; Fri, 20 Aug 2004 15:51:09 +0200 (MEST) Received: by dwp.des.no (Postfix, from userid 2602) id 70B58B873; Fri, 20 Aug 2004 15:50:33 +0200 (CEST) To: Pawel Jakub Dawidek References: <20040820090006.GX30151@darkness.comp.waw.pl> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Fri, 20 Aug 2004 15:50:33 +0200 In-Reply-To: <20040820090006.GX30151@darkness.comp.waw.pl> (Pawel Jakub Dawidek's message of "Fri, 20 Aug 2004 11:00:06 +0200") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable cc: freebsd-current@freebsd.org Subject: Re: Bogus usage of tsleep(9) in USB. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 13:50:55 -0000 Pawel Jakub Dawidek writes: > There are many calls to tsleep(9) with no timeout in our USB code. > As you all know, it is not permitted and we have KASSERT() for this: > > KASSERT(timo !=3D 0 || mtx_owned(&Giant) || mtx !=3D NULL, > ("sleeping without a mutex")); This panic message only applies to one of the three conditions the KASSERT tests. It should probably be split into three separate KASSERTs with three different panic messages. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no