I am using work queues to handle asynchronous incoming signals to my device. Here is the high-level code that I have so far:
<