glibc/misc/Versions
Adhemerval Zanella 52bd938169 posix: Implement preadv2 and pwritev2
This patch adds support of preadv2 and pwritev2 which are similar to
preadv/pwritev but with an extra flag argument.  As for preadv/pwritev
both interfaces are added a non-standard GNU API.

For default 'posix' implementation trying to emulate the Linux supported
flags is troublesome:

   * We can not temporary change the file state of the O_DSYNC and O_SYNC
     flags to emulate RWF_{D}SYNC (attempts to change the state of using
     fcntl are silently ignored).

   * IOCB_HIPRI requires the file opened in O_DIRECT and uses an internal
     semantic not provided by any other flag (O_NONBLOCK for instance).

So default sysdeps/posix implementations fails with EOPNOTSUPP for any non
supported flag (which are none currently) calls generic preadv/pwritev.
Basically this implementation supports only preadv2 called as preadv (with
flags sets to 0).

The Linux one uses the preadv2/pwritev2 syscall if defined, otherwise it
call preadv/writev.  Instead of using the previous __ASSUME_* to
unconditionally issue the syscall (and avoid building the fallback routine),
it call pread/write if the preadv2/pwritev2 syscalls fails.  The idea
is just avoid adding another __ASSUME_* and checking each architecture
on every kernel bump and simplify code conditionals.

Checked on x86_64-linux-gnu and on i686-linux-gnu and a check with
run-built-tests=no on aarch64-linux-gnu, alpha-linux-gnu, arm-linux-gnueabihf,
ia64-linux-gnu, m68k-linux-gnu, microblaze-linux-gnu, mips{64,64n32}-linux-gnu,
nios2-linux-gnu, powerpc{64,64le}-linux-gnu, s390{x}-linux-gnu,
sparc{64,v9}-linux-gnu, tile{gx,pro}-linux-gnu, and sh4-linux-gnu (all using
gcc 6.3).

	* NEWS: Add note about pwritev2 and preadv2 inclusion.
	* misc/Makefile (routines): Add preadv2, preadv64v2, pwritev2, and
	pwritev64v2.
	(tests): Add tst-preadvwritev2 and tst-preadvwritev64v2.
	* misc/Versions (GLIBC_2.26): Add preadv2, preadv64v2, pwritev2, and
	pwritev64v2.
	* misc/preadv2.c: New file.
	* misc/preadv64v2.c: Likewise.
	* misc/pwritev2.c: Likewise.
	* misc/pwritev64v2.c: Likewise.
	* misc/tst-preadvwritev2.c: Likewise.
	* misc/tst-preadvwritev64v2.c: Likewise.
	* manual/llio.texi: Add preadv2 and pwritev2 documentation.
	* misc/sys/uio.h [__USE_GNU && !__USE_FILE_OFFSET64] (preadv2): New
	prototype.
	[__USE_GNU && !__USE_FILE_OFFSET64] (pwritev2):	Likewise.
	[__USE_GNU && __USE_FILE_OFFSET64] (preadv64v2): Likewise.
	[__USE_GNU && __USE_FILE_OFFSET64] (pwritev64v2): Likewise.
	* misc/tst-preadvwritev-common.c (PREADV): Define if not defined.
	(PWRITEV): Likewise.
	(do_test_with_offset): Use PREADV and PWRITEV macros and check for
	ENOSYS.
	* nptl/tst-cancel4.c (tf_pwritev2): New test.
	(tf_preadv2): Likewise.
	(tf_fsync): Add tf_pwritev2 and tf_preadv2.
	* sysdeps/posix/preadv2.c: Likewise.
	* sysdeps/posix/preadv64v2.c: Likewise.
	* sysdeps/posix/pwritev2.c: Likewise.
	* sysdeps/posix/pwritev64v2.c: Likewise.
	* sysdeps/unix/sysv/linux/kernel-features.h: Add comment for syscall
	support in kernel.
	* sysdeps/unix/sysv/linux/preadv2.c: Likewise.
	* sysdeps/unix/sysv/linux/preadv64v2.c: Likewise.
	* sysdeps/unix/sysv/linux/pwritev2.c: Likewise.
	* sysdeps/unix/sysv/linux/pwritev64v2.c: Likewise.
	* sysdeps/unix/sysv/linux/preadv.c (preadv): Add libc_hidden_def.
	* sysdeps/unix/sysv/linux/preadv64.c (preadv64): Likewise.
	* sysdeps/unix/sysv/linux/pwritev.c (pwritev): Likewise.
	* sysdeps/unix/sysv/linux/pwritev64.c (pwritev64): Likewise.
	* sysdeps/unix/sysv/linux/bits/uio.h: Add supported preadv2/pwritev2
	support flags on Linux.
	* sysdeps/unix/sysv/linux/aarch64/libc.abilist (GLIBC_2.26): Add
	preadv2, preadv64v2, pwritev2, pwritev64v2.
	* sysdeps/unix/sysv/linux/alpha/libc.abilist (GLIBC_2.26): Likewise.
	* sysdeps/unix/sysv/linux/arm/libc.abilist (GLIBC_2.26): Likewise.
	* sysdeps/unix/sysv/linux/hppa/libc.abilist (GLIBC_2.26): Likewise.
	* sysdeps/unix/sysv/linux/i386/libc.abilist (GLIBC_2.26): Likewise.
	* sysdeps/unix/sysv/linux/ia64/libc.abilist (GLIBC_2.26): Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/nios2/libc.abilist (GLIBC_2.26): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
	(GLIBC_2.26): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
	(GLIBC_2.26): Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
	(GLIBC_2.26): Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/sh/libc.abilist (GLIBC_2.26): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/sysv/linux/tile/tilegx/tilegx32/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/sysv/linux/tile/tilegx/tilegx64/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist (GLIBC_2.26):
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist (GLIBC_2.26):
	Likewise.
2017-05-31 17:35:46 -03:00

168 lines
3.0 KiB
Plaintext

libc {
GLIBC_2.0 {
# global variables
___brk_addr; __curbrk; __progname; __progname_full;
# interface of malloc functions
__sbrk; __getpagesize;
# functions used in other libraries
__select;
# variables in normal name space
error_message_count; error_one_per_line; error_print_progname;
# variables in normal name space
loc1; loc2; locs;
program_invocation_name; program_invocation_short_name;
# a*
acct; addmntent; advance;
# b*
brk;
# c*
chflags; chroot; closelog;
# d*
daemon; dirname;
# e*
ecvt; ecvt_r; endfsent; endmntent; endttyent; endusershell;
# e*
err; error; error_at_line; errx;
# f*
fchflags; fcvt; fcvt_r; fdatasync; fsync; ftruncate;
# g*
gcvt; get_avphys_pages; get_nprocs; get_nprocs_conf; get_phys_pages;
getfsent; getfsfile; getfsspec; gethostid; gethostname; getmntent;
getmntent_r; getpagesize; getpass; getttyent; getttynam; getusershell;
gtty;
# h*
hasmntopt; hcreate; hcreate_r; hdestroy; hdestroy_r; hsearch; hsearch_r;
# i*
insque; ioctl;
# j*
jrand48; jrand48_r; lfind; lsearch;
# m*
madvise; mkstemp; mktemp; mlock; mlockall; mmap; mount; mprotect; msync;
munlock; munlockall; munmap;
# o*
openlog;
# p*
ptrace;
# q*
qecvt; qecvt_r; qfcvt; qfcvt_r; qgcvt;
# r*
readv; reboot; remque; revoke;
# s*
sbrk; select; setdomainname; setfsent; sethostent; sethostid; sethostname;
setlogmask; setmntent; setregid; setreuid; setttyent; setusershell; sstk;
stty; sync; syscall; syslog;
# t*
tdelete; tfind; truncate; tsearch; ttyslot; twalk;
# u*
ualarm; usleep; ustat; utimes;
# v*
verr; verrx; vhangup; vsyslog; vwarn; vwarnx;
# w*
warn; warnx;
# w*
writev;
}
GLIBC_2.1 {
# f*
ftruncate64;
# m*
mmap64;
# t*
tdestroy; truncate64;
}
GLIBC_2.2 {
# g*
getloadavg;
# m*
mincore; mkdtemp; mkstemp64;
# p*
posix_madvise;
}
GLIBC_2.3 {
# f*
fgetxattr; flistxattr; fremovexattr; fsetxattr;
futimes;
# g*
getxattr;
# l*
listxattr;
lgetxattr; llistxattr; lremovexattr; lsetxattr;
lutimes;
# r*
removexattr;
# s*
setxattr;
}
GLIBC_2.3.3 {
remap_file_pages;
}
GLIBC_2.4 {
futimesat;
__syslog_chk; __vsyslog_chk;
}
GLIBC_2.7 {
mkostemp; mkostemp64;
}
GLIBC_2.10 {
preadv; preadv64; pwritev; pwritev64;
}
GLIBC_2.11 {
mkstemps; mkstemps64; mkostemps; mkostemps64;
}
GLIBC_2.14 {
syncfs;
}
GLIBC_2.16 {
__getauxval; getauxval;
}
GLIBC_2.23 {
# SHLIB_COMPAT(GLIBC_2_0, GLIBC_2_23) used in regexp.c
}
GLIBC_2.25 {
gnu_dev_major; gnu_dev_minor; gnu_dev_makedev;
}
GLIBC_2.26 {
preadv2; preadv64v2; pwritev2; pwritev64v2;
}
GLIBC_PRIVATE {
__madvise;
__mktemp;
__libc_ifunc_impl_list;
__tdelete; __tfind; __tsearch; __twalk;
}
}