DragonFly kernel List (threaded) for 2004-04
Re: serializing token
On Mon, Apr 26, 2004 at 12:16:43PM -0400, Matthew Dillon wrote:
> :Is it not suitable for protection between the producer and consumer?
> :Specifically, I have a driver that shares an event queue between the
> :interrupt handler and a kernel thread (interrupt creates events,
> :thread processes them). What is the prefered DFly scheme to protect
> :the queue's head/tail pointers?
> :Chuck Tuffli
> :Agilent Technologies, Storage Area Networking
> The answer is: don't have a queue at all, have the driver send a
> message to the kernel thread instead.
This actually fits better with the over-all design and is what I will
try for the DFly version. Since the other *BSDs don't have an analogous
kernel messaging scheme (right?), the driver would need to do
something like you describe below for them, I guess.
> But if you really wanted to have a queue I would use a tail-chasing
> FIFO where the driver always and only manipulates the fifo's write
> index, and the thread always and only manipulates the fifo's read
Thanks for the help!
Agilent Technologies, Storage Area Networking