kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Does poll handler is in interrupt context ?
@ 2016-12-18  9:24 Ran Shalit
  2016-12-18 12:47 ` Tal Shorer
  0 siblings, 1 reply; 2+ messages in thread
From: Ran Shalit @ 2016-12-18  9:24 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Does poll handler is in interrupt context ?
  2016-12-18  9:24 Does poll handler is in interrupt context ? Ran Shalit
@ 2016-12-18 12:47 ` Tal Shorer
  0 siblings, 0 replies; 2+ messages in thread
From: Tal Shorer @ 2016-12-18 12:47 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Dec 18, 2016 at 11:24 AM, Ran Shalit <ranshalit@gmail.com> wrote:
> 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 ?
No. the process will continue running in thread context.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-18 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-18  9:24 Does poll handler is in interrupt context ? Ran Shalit
2016-12-18 12:47 ` Tal Shorer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).