Mailing List archive

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

[linux-dvb] Re: problems with dmxSctFilterParams and NEWSTRUCT



Jeremy Hall wrote:
> ok that would be great!
> 
> One thing I have trouble with, when reading the source is:
> 
> 1: which of these functions are executed in interrupt context

In the current version only av7110_irq() will run as interrupt handler, 
all functions below will run in their respective tasklets. On 
multiprocessor machines they might run in parallel since a tasklet is 
only serialized to itself.


> 2: which functions are only called after a spinlock has been acquired and
> which ones need the spinlock
> 
> void foo() {
> spin_lock(&foo_lock);
> foo2();
> spin_unlock(&foo_lock);
> }
> 
> void foo2() {
> 
> spin_lock(&foo_lock);
> j = 5;
> spin_unlock(&foo_lock);
> }
> 
> This would not work in userspace.  Would it create a deadlock in a UP
> kernel? or does the kernel continue before foo2 finishes?

on SMP machines this code will deadlock when you try to lock foo_lock 
the second time. On UP machines the locking code will get optimized away 
unless you turn on the spin lock debugging option in your kernel.

Holger



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



Home | Main Index | Thread Index