locking in a device driver

Julian Elischer julian at elischer.org
Tue Nov 1 14:16:07 PST 2005

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.

More information about the freebsd-hackers mailing list