spin_lock for the embedded systems !

Feb 28, 2005 2 Replies

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


No. Some embedded systems have interrupts too...

Andrew

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 ?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required