for a socket file , what does "file->f_op->poll()" do ?

Henrique Rodrigues henriquesilvar at
Fri Jan 11 15:02:16 EST 2013

In the file_operations struct, it is a pointer to another function that
your module/code should implement. The file_operations struct, like many
others in the kernel, contains a generic set of functions that the kernel
expect your code will implement.

In the proc fs for example, mounts_poll ( is an
implementation of the poll function that is later associated with the
pointer of the file_operations structure at

Take a look at the LDD ( to learn how a driver
implementation should use these kind  of functions to understand it better.

Henrique Rodrigues

On Fri, Jan 11, 2013 at 12:14 AM, horseriver <horserivers at> wrote:

> hi:
>   for a socket file point , what will this function do ?
>   file->f_op->poll();       ///poll is declared  in the file-operations
> struct .
>   but I do not find this function's definition .
>   Is there some advice?
> thanks!
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Kernelnewbies mailing list