dev_lock() question
John Baldwin
jhb at FreeBSD.org
Thu Sep 29 11:59:19 PDT 2005
On Thursday 29 September 2005 02:14 pm, Poul-Henning Kamp wrote:
> In message <200509291408.18098.jhb at 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 at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-hackers
mailing list