spin_lock doesn't work?!?
jwboyer at linux.vnet.ibm.com
Thu Aug 30 21:50:39 EST 2007
On Wed, 29 Aug 2007 23:30:22 -0700 (PDT)
melinda develey <melinda.develey70 at yahoo.com> 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 126.96.36.199 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.
More information about the Linuxppc-embedded