Mailing List archive

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

[linux-dvb] Re: [PATCH] support for multiple feeds per pid



On Mon, Feb 17, 2003 at 11:48:28PM +0100, Emard wrote:
> > you must not use semaphores but spinlocks for locking data accessed from 
> > irq handlers. Places where lists are altered have to use irq safe 
> > spinlocks, which switch off interrupts while the lists are modified.
> > 
> > All the other code can use readonly spinlocks. In any case you want to 
> > keep this locking as fine-grained as possible.
> > 
> > Holger
> 
> There's down_interruptible(demux->mutex), being called from
> ioctl over several functions before it updates the list.
> 
> OK, maybe this down_interruptible should be the spinlock.
> 
> It will disable interrupts. Besides of disabling them, I think
> it has to also wait for e.g. vpeirq() to finish.
> 
> Is this wait_for_vpeirq() finish being done automatically
> by the spinlock or should we after the spinlock additionaly
> wait for vpeirq to finish ?

I think you might like to read the following documents:
http://kernelnewbies.org/documents/kdoc/kernel-locking/lklockingguide.html
http://lwn.net/Articles/21064/


HTH,
Johannes


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index