Skip to contentSkip to conversation

sys_poll/do_poll/f_op->poll

DISCUSSION Shaya Potter 2 participants 3 messages Mar 2, 2006 VFS

lore
Share & tools
lore
#0 lore raw

am I missing something or do none of the in kernel file system use this code (and would therefore sys_poll() not work on them?)

I figure I'm probably blind to something obvious, just unsure what it is.

thanks.

#1 lore raw
Quoted 2 lines · Shaya Potter

am I missing something or do none of the in kernel file system use this code (and would therefore sys_poll() not work on them?)

sys_poll() is _required_ by tradition and standards to return (at least) POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM for regular files.

That's why there are no poll operations for files in any filesystem.

-- Jamie

#2 lore raw
Quoted 9 lines · Jamie Lokier
Quoted 2 lines · Shaya Potter

am I missing something or do none of the in kernel file system use this code (and would therefore sys_poll() not work on them?)

sys_poll() is _required_ by tradition and standards to return (at least) POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM for regular files.

That's why there are no poll operations for files in any filesystem.

and I wasn't thinking right either, poll would generally be used for a place where read/write would block indefintely, which i guess is "never" for a regular file ("never" in quotes as not literally true, but when compared to a socket or a pipe).

strange that at 4am I realized what at midnight I didn't :)