Re: interrupt - spin lock question

From: sridharv@ufl.edu
Date: Mon Mar 04 2002 - 01:33:30 EST


 
> Right, that is why you would use a spin_lock ! :)
>
> Further, you would want to use a spin_lock_irq and related friends. The
> irq disable prevents the race wrt interrupts and the spin_lock prevents
> racing wrt SMP.
>

ok things are clear now. so the spin_lock_irq friends are actually for 2
purposes - preventing racing from interrupts and from SMP. so if SMP is not
chosen only the local_irq_disable() part works right??

do { local_irq_disable(); spin_lock(lock); } while (0)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 07 2002 - 21:00:31 EST