serializing token
Matthew Dillon
dillon at apollo.backplane.com
Mon Apr 26 09:18:01 PDT 2004
: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.
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
index.
-Matt
Matthew Dillon
<dillon at xxxxxxxxxxxxx>
More information about the Kernel
mailing list