Can we use semaphore or mutex or spin lock in interrupt
context in linux kernel ?

Answer Posted / achilles

We cannot sleep in interrupt context so semaphores and mutex
can't be used.
Spinlocks can be used for locking in interrupt context.

Is This Answer Correct ?    31 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use printf inside isr?

603


Tell me what are the different types of customizations that is used with the “volatile” keyword?

641


Tell us what is the need for an infinite loop in embedded systems?

592


What is so great about ?

543


Explain some of the commonly found errors in embedded systems?

573






How are local and global variables are allocated by compiler.

619


Describe a pattern that is not the factory pattern?

576


Explain what is the need for an infinite loop in embedded systems?

626


What are real-time embedded systems?

577


Can we put breakpoint inside isr?

555


What are the 4 types of inheritance relationship?

603


Explain the difference between a microcontroller and an embedded system?

624


Can you name the differences between object-oriented and component-based design?

636


Do you know what is priority inheritance?

592


Mention what are buses used for communication in embedded system?

621