I am porting an audio mixer from directsound on Windows to alsa on Linux. I am polling on, let's say, 16 file descriptors using the system call "poll". Now i need to be able to abort the polling somehow. On Windows i am using the WaitForMultipleObjects using events and when i need to abort the waiting i just SetEvent on one of the events causing the wait to return. Is there any way to mark a file descriptor in Linux "ready" so that the poll will return?
I have taken a look at ppoll but i am not familiar with signals and i don't want to handle unnecessary race conditions. I mean, if alsa can set the file descriptors to "ready" i should also be able to ;)