Can we use semaphore or mutex or spin lock in interrupt
context in linux kernel ?
Answers were Sorted based on User's Feedback
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 |
Answer / jagannath
spinlock with irq saved is the best choice in interrupt
handler.
Is This Answer Correct ? | 5 Yes | 2 No |
Explain what is meant by a sandbox, why you would use one, and identify examples of sandboxes in the wild.
can please tel me faq's asking in interviews on microcontrollers
What is an embedded system and why it is used?
Tell me what are the uses of the keyword volatile?
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).
Explain what is size of character, integer, integer pointer, character pointer?
You have two computers, and you want to get data from one to the other. How could you do it?
Tell me whether we can use semaphore or mutex or spinlock in interrupt context in linux kernel?
Tell me why does pre-emptive multi-threading used to solve the central controller problem?
Which parameters decide the size of data type for a processor?
Explain difference between risc and cisc processor?
What typecast is applied when we have a signed and an unsigned int in an expression?