From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 24 14:12:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E8E816A4CE for ; Fri, 24 Dec 2004 14:12:11 +0000 (GMT) Received: from linux01.gwdg.de (linux01.gwdg.de [134.76.13.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A987A43D5C for ; Fri, 24 Dec 2004 14:12:10 +0000 (GMT) (envelope-from jengelh@linux01.gwdg.de) Received: from linux01.gwdg.de (localhost [127.0.0.1])iBOEC9rg009458 for ; Fri, 24 Dec 2004 15:12:09 +0100 Received: from localhost (jengelh@localhost) by linux01.gwdg.de (8.12.7/8.12.7/Submit) with ESMTP id iBOEC8UK009454 for ; Fri, 24 Dec 2004 15:12:08 +0100 Date: Fri, 24 Dec 2004 15:12:08 +0100 (MET) From: Jan Engelhardt Cc: freebsd-hackers@freebsd.org In-Reply-To: <20041224125226.79738.qmail@web52701.mail.yahoo.com> Message-ID: References: <20041224125226.79738.qmail@web52701.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: Kernel crash w/o reason X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Dec 2004 14:12:11 -0000 >> I wanted that the device can only be opened once, >> and holding a mutex while it >> is open seemed like a simple idea. (Since >> mtx_trylock() will then fail -- easy >> to implement.) > >An even more simpler idea would be to set a flag in >the softc data structure on initialization, so as to >avoid initializing again. And where do I do that? Do you mean in the struct cdevsw? Jan Engelhardt -- ENOSPC