Does poll handler is in interrupt context ?

Ran Shalit ranshalit at gmail.com
Sun Dec 18 04:24:19 EST 2016


Hello,

This is something I'm not too sure about, so I rather ask it here:
When the context return to userspace on calling poll, is it done in
interrupt context ?
...
ret = poll(fds, 2, TIMEOUT * 1000);
if (ret == -1) {
perror ("poll");
return 1;
}
if (!ret) {
return 0;
}
if (fds[0].revents & POLLIN)
printf ("POLLIN\n");
if (fds[1].revents & POLLOUT)
printf ("POLLOUT\n");
return 0;

Regards,
Ran



More information about the Kernelnewbies mailing list