Hi,
I would like to know why spin locks are used instead of semaphores inside an interrupt handler.
Thanks & Regards,
Mousey
Hi,
I would like to know why spin locks are used instead of semaphores inside an interrupt handler.
Thanks & Regards,
Mousey
Semaphores cause tasks to sleep on contention, which is unacceptable for interrupt handlers. Basically, for such a short and fast task (interrupt handling) the work carried out by the semaphore is overkill. Also, spinlocks can't be held by more than one task.