Simplify sendmmsg code
Florian Weimer
fweimer@redhat.com
Wed May 10 07:41:00 GMT 2017
On 05/09/2017 10:58 PM, Adhemerval Zanella wrote:
> So if I understood correctly, the idea is to *remove* sendmmsg on resolv code then?
> Because now with __ASSUME_SENDMMSG being used as default for Linux this code will
> be used on all architectures.
Yes, once we have two sockets, we need to call sendmsg for each one
separately. But that's an *algorithmic* change, it's not simply about
replacing one call to sendmmsg with two to sendmsg. But that would be
fine as an intermediate step as well if you want to simplify things in
this way.
> In any case, my understanding for sendmmsg is it is a GNU extension (similar to
> pwritev), so the idea is to have a fallback usable code on sysdeps/{posix,unix}
> to we do not need to actually tests its usability in the rest of glibc code.
As far as I understand things, both sendmmsg and pwritev cannot be
emulated in userspace because the fallback implementation would not have
the atomicity guarantees provided by the kernel implementation. IMHO,
the generic versions should just return ENOSYS (or not linked in at all,
so that configure scripts can note their absence).
Thanks,
Florian
More information about the Libc-alpha
mailing list