DragonFly BSD
DragonFly kernel List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: serializing token


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Apr 2004 09:16:43 -0700 (PDT)

: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@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]