spin_lock for the embedded systems !

Hi,

spin_locks are busy-looping locks, they needssanother processor to help them to escape the busy loop. So, I think spin_locks are useless for a single processor embedded system. Is it right ?

regards, Saturn

Reply to
brian
Loading thread data ...

No. Some embedded systems have interrupts too...

--
Andrew
Reply to
Andrew Reilly

But spin_lock() in the include/linux/spin_lock.h is nothing to do if CONFIG_SMP does not define. So, if spin_lock_bh() is invoked, it just disable BH but not lock the critical session. Right ?

Reply to
brian

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.