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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / jagannath

spinlock with irq saved is the best choice in interrupt
handler.

Is This Answer Correct ?    5 Yes 2 No

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

Answer / baazicha

You can give a binary semaphore from ISR.

Is This Answer Correct ?    2 Yes 11 No

Post New Answer

More Embedded Systems AllOther Interview Questions

Explain what is meant by a sandbox, why you would use one, and identify examples of sandboxes in the wild.

0 Answers  


can please tel me faq's asking in interviews on microcontrollers

0 Answers   TCS,


What is an embedded system and why it is used?

0 Answers  


Tell me what are the uses of the keyword volatile?

0 Answers  


Discuss the differences between mocks and stubs/fakes and where you might use them (answers aren't that important here, just the discussion that would ensue).

0 Answers  


Explain what is size of character, integer, integer pointer, character pointer?

0 Answers  


You have two computers, and you want to get data from one to the other. How could you do it?

0 Answers  


Tell me whether we can use semaphore or mutex or spinlock in interrupt context in linux kernel?

0 Answers  


Tell me why does pre-emptive multi-threading used to solve the central controller problem?

0 Answers  


Which parameters decide the size of data type for a processor?

0 Answers  


Explain difference between risc and cisc processor?

0 Answers  


What typecast is applied when we have a signed and an unsigned int in an expression?

0 Answers  


Categories