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

Discussion

A callback-based driver hands the data to the application by

  • A.blocking the application until the data arrives
  • B.raising an interrupt the application handles itself
  • C.calling a function the application registered
  • D.writing it into a buffer the application polls

Answer: C

It suits an event-driven design and avoids a task blocked on every device, but the callback runs in whatever context the driver was in, often an interrupt handler. Documenting that context is essential, since what the callback may do depends on it.

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

Post your comment

Please log in or register to post a comment.