> from interrupt context also.
do you mean to say if I write some code like this ...
spin_lock_t lock = SPIN_LOCK_UNLOCKED ;
void some_function(void)
{
spin_lock_irq(&lock);
do_some_thing;
spin_unlock_irq(&lock);
}
int intr_handler(XXXX)
{
spin_lock_irq(&lock);
do_some_thing;
spin_unlock_irq(&lock);
}
will it cause deadlock?
> Spinlocks are used in the kernel only, so I kinda missed the point here.
> Can you rephrase?
Actually I thought that spin_lock_irqsave will save the total context.
I understood it now.
-Mahesh.
Download prohibited? No problem! CHAT from any browser, without download.