On Wed, 29 Aug 2007 23:30:22 -0700 (PDT)
melinda develey <[EMAIL PROTECTED]> wrote:

>   >You should still put the spin_lock calls into your code because >you
> >never know if someone else will compile it and for another >target. If
> >someone would, for example, compile the same code for a SMP >machine then
> >the spin_lock will actually lock.
> 
>   I used the spinlock both in an interrupt handler to protect a group of 
> variables (because in an interrupt I can't use a semaphore) and the same 
> spinlock in a ioctl handler where the same group of variables is accessed. Is 
> this wrong? I have a 2.6.19.2 linux kernel.

You might want to use spin_lock_irq instead.  That will disable
interrupts in the critical section in the ioctl.  Seems more like what
you are trying to do.

josh
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Reply via email to