Machine-translated by Google. Questions are authored in English.
Top

Discussion

Three of the following can be done from an interrupt handler. The exception is

  • A.giving a semaphore with the from-ISR variant
  • B.sending to a queue with a zero timeout
  • C.setting a bit in an event group
  • D.taking a mutex

Answer: D

Correct answer: taking a mutex

A mutex has an owner and supports priority inheritance, neither of which means anything in an interrupt handler - there is no task to own it and no priority to inherit. Worse, blocking on it would be fatal, since a handler cannot be suspended. The other three all have non-blocking from-interrupt variants.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.