Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 1997 13:20:18 -0700 (MST)
From:      Nate Williams <nate@mt.sri.com>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        luigi@labinfo.iet.unipi.it (Luigi Rizzo), hackers@freebsd.org
Subject:   Re: a question about LKM
Message-ID:  <199710272020.NAA02166@rocky.mt.sri.com>
In-Reply-To: <199710271843.LAA24331@usr04.primenet.com>
References:  <199710270641.HAA03134@labinfo.iet.unipi.it> <199710271843.LAA24331@usr04.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > I am looking at how ot make my audio driver an LKM.
> > 
> > I have seen some examples of LKMs but none of them uses interrupts.
> > As a consequence, I am a bit unclear on what actions should be done
> > at load time (and especially, at unload time) so that interrupts
> > are properly delivered. For the attach part i can probably figure
> > it out -- just do the standard attach() action -- but what for the
> > detach ?
> 
> Look at the PCCARD code (it has to detach things as well).

It's full of races, but I don't think there is a way around given that
'detach' happens w/out any event signalling it's going to occur.
Because of that, most of the stuff is left 'lying around' in case the
kernel is in the middle of doing something.

Also, most of the kernel doesn't allow 'giving back' resources.


Nate



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