Date: Thu, 29 Sep 2005 14:55:58 -0400 From: John Baldwin <jhb@FreeBSD.org> To: "Poul-Henning Kamp" <phk@phk.freebsd.dk> Cc: freebsd-hackers@FreeBSD.org, Divacky Roman <xdivac02@stud.fit.vutbr.cz>, Stanislav Sedov <stas@310.ru> Subject: Re: dev_lock() question Message-ID: <200509291455.59914.jhb@FreeBSD.org> In-Reply-To: <15314.1128017679@critter.freebsd.dk> References: <15314.1128017679@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 29 September 2005 02:14 pm, Poul-Henning Kamp wrote: > In message <200509291408.18098.jhb@FreeBSD.org>, John Baldwin writes: > >Actually, you would think that it could be initialized either via an early > >SYSINIT() or in the init_mutexes() function in kern_mutex.c and thus not > > need the early check and avoid penalizing dev_lock(). > > > >phk, how early his dev_lock needed? > > Far too early due to console madness (in syscons I belive). So would mutex_init() work? It's called very early in the MD startup code right after things like curthread are initialized. If dev_lock() is called before mutex_init() it can't work right anyway as mtx_init() doesn't work until then. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509291455.59914.jhb>