kiocb in the sendmsg() prototype

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you take a look at the code of sock_sendmsg, you will see that it allocates a kiocb structure on the stack, initialises it, and passes it to __sock_sendmsg. The latter fills in some information in the private section of the structure, and passes it to the appropriate sendmsg implementation. However, as far as I can see, none of the protocol-specific implementations actually uses this structure. If I understand correctly, kiocb is meant to be used with asynchronous I/O, which may be implemented in the future. But why bother creating and initialising the structure in the meantime? Also, since the information passed in the kiocb structure is also available through the other sendmsg parameters, aren't these parameters now redundant?

Elad

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux