Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Nov 2005 14:16:00 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Dinesh Nair <dinesh@alphaque.com>
Cc:        freebsd-hackers@freebsd.org, Scott Long <scottl@samsco.org>
Subject:   Re: locking in a device driver
Message-ID:  <4367E920.1020001@elischer.org>
In-Reply-To: <4367CCBA.9040506@alphaque.com>
References:  <4360B8EE.4070605@alphaque.com>	<4360DD7B.20900@samsco.org>	<4361044B.50807@alphaque.com>	<20051027.205250.55834228.imp@bsdimp.com>	<4361E3E0.4090409@alphaque.com>	<43676121.4030801@alphaque.com>	<436791ED.8010808@samsco.org>	<4367AA8D.3060506@alphaque.com>	<4367BBDB.7020005@elischer.org>	<4367C07C.1040900@alphaque.com> <4367C726.8070405@samsco.org> <4367CCBA.9040506@alphaque.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dinesh Nair wrote:

>
> On 11/02/05 03:51 Scott Long said the following:
>
>> INTR_TYPE_TTY and spltty
>
> [..snipped..]
>
>> You'll also want to use an spl in the top half of the pseudo driver to
>> cover where the pointers are read and changed.
>
>
> thanx a bunch. i'll rewrite the portions affected based on yours and 
> julian's suggestions and report back on how it went. this has been a 
> very educating experience for me.


except for selecting a TYPE, the bottom half shouldn't need any 
locking.  It's already at splimp() (or spltty())

only code that can be run on behalf of the user, or from some other 
initiator (such as the clock) needs the spl..

also, why do you need a pseudo device AND a device? The device driver 
can do all the things you have
suggested on its own.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4367E920.1020001>