In a device driver for some PCI hardware, I have an ioctl
call that waits for an incoming interrupt on the PCI bus. Using wait_queue_head_t
, I put the task to sleep by calling schedule()
.
Then, the irq_handler
function wakes up this task when the interrupt is raised on the PCI bus. Everything seems to work correctly.
My question is how to differentiate whether the schedule()
call is returning because of my irq_handler
function wake it up, or because some signal has been send?
Do I have to handle it by myself with flags in the irq_handler
function?