Reputation: 1192
I have a Windows device driver that I'd like to port to Linux.
Our user-space application often needs to wait for driver events. Here's the mechanism that we use on Windows :
What I like with this:
I'd like to keep the same architecture in my Linux driver.
Does anyone know how I could get the same behaviour on Linux ?
Upvotes: 0
Views: 651
Reputation: 26
One simple idea would be to create a character device with blocking read. User application reads from the device; such read blocks until the event happens.
Edit:
Another idea is to send signal to userspace application whose handler will set the userspace wait handle (futex probably).
Upvotes: 1