Mutexes inside interrupt service routine

Go To StackoverFlow.com

0

In linux, why can't we have a mutex inside an isr() routine for protecting a shared resource ?

2012-04-04 17:37
by Sharat Chandra


3

Because a lock operation on a mutex can sleep and it's illegal to sleep in an ISR. Use a spinlock instead.

2012-04-04 17:40
by cnicutar
Ads