Date: Wed, 02 Nov 2005 11:09:33 -0800 From: Julian Elischer <julian@elischer.org> To: Dinesh Nair <dinesh@alphaque.com> Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver Message-ID: <43690EED.10703@elischer.org> In-Reply-To: <43690424.1040904@alphaque.com> References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <43690424.1040904@alphaque.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Dinesh Nair wrote: > > > On 10/28/05 10:52 M. Warner Losh said the following: > >> libc_r will block all other threads in the application while an ioctl >> executes. libpthread and libthr won't. I've had several bugs at work > > > so if the userland thread does an ioctl, and the the driver goes to > tsleep() when the ioctl is received, all other threads are also > blocked from executing, i.e wont be context switched to run ? in 4.x and earlier. a tsleep saves your spl level but re-enables the interrupts (from memory) when you re-awaken you are given your spl level again.. All other threads are allowed to run. lower level code (the interupt executed part is not allowed to ever sleep) > > is this behaviour only 4.x specific or is it also there in 5.x ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43690EED.10703>