Question regarding pwritev/preadv ports

Mike Frysinger vapier@gentoo.org
Sun Sep 6 14:35:00 GMT 2015


On 06 Sep 2015 12:03, Ben wrote:
> I was wondering if there is any way for an application to 'know' 
> which implementation is used.

not really, by design

> The specific reason is: I want to override the posix implementation 
> with a non-atomic one.
> (So just iterating over the vector until all is written.)

just define & export the symbol then in a shared library and link or
LD_PRELOAD it to interpose your version of the symbol

> Furthermore, looking at the platform specific implementations,
> they need to have the offset split into high and low value, I get that.

i wouldn't worry about trying to call the kernel directly.  use dlopen
and dlsym to get the symbol of the real pwritev from libc.so and call
that one at a time on a single iovec element.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-help/attachments/20150906/1470444b/attachment.sig>


More information about the Libc-help mailing list