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

Discussion

A handler writes to a queue with a zero timeout and the queue is full. The correct handling is

  • A.to take a mutex and wait for the consumer
  • B.to count the loss and continue, the handler being unable to block
  • C.to retry within the handler until space appears
  • D.to disable the interrupt source permanently

Answer: B

Blocking in a handler is impossible, so the only options are to drop the item or to overwrite one, and either way the loss should be counted so it can be seen. A persistent overflow count is the signal that the queue or the consumer needs attention.

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

Post your comment

Please log in or register to post a comment.