DragonFly kernel List (threaded) for 2004-04
Re: serializing token
: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?
: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.
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