glibc/sysdeps/unix/sysv/linux
Joseph Myers e3b0580d0d Simplify accept4, recvmmsg, sendmmsg code.
The accept4, recvmmsg and sendmmsg functions had macros
__ASSUME_*_SYSCALL_WITH_SOCKETCALL.  Before we could assume kernels
with the relevant functionality, these macros represented the
conditions under which, on a socketcall architecture, glibc could just
call the syscall unconditionally and not have to deal with socketcall
at all for those functions, because if the syscall didn't work for
them the socketcall call wouldn't either.

Now we can assume kernels with the relevant functionality, the only
question is whether we can assume the syscall is present; if not, we
are on a socketcall architecture and just use socketcall instead.
Thus, this patch removes the macros that are no longer necessary, and
simplifies the code for accept4, recvmmsg and sendmmsg to use the same
logic as the other C implementations of socket functions that may use
a syscall or socketcall depending on kernel support.

Tested for x86_64 and x86.

	* sysdeps/unix/sysv/linux/accept4.c (accept4): Use syscall if
	[__ASSUME_ACCEPT4_SYSCALL], otherwise socketcall.
	* sysdeps/unix/sysv/linux/recvmmsg.c (recvmmsg): Use syscall if
	[__ASSUME_RECVMMSG_SYSCALL], otherwise socketcall.
	* sysdeps/unix/sysv/linux/sendmmsg.c (__sendmmsg): Use syscall if
	[__ASSUME_SENDMMSG_SYSCALL], otherwise socketcall.
	* sysdeps/unix/sysv/linux/kernel-features.h
	(__ASSUME_ACCEPT4_SYSCALL): Move to general list of macros for
	socket syscalls.
	(__ASSUME_RECVMMSG_SYSCALL): Likewise.
	(__ASSUME_SENDMMSG_SYSCALL): Likewise.
	* sysdeps/unix/sysv/linux/i386/kernel-features.h
	(__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL): Remove.
	(__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
	* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
	(__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL): Remove.
	* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
	(__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
	* sysdeps/unix/sysv/linux/sh/kernel-features.h
	(__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
	* sysdeps/unix/sysv/linux/sparc/kernel-features.h
	(__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL): Likewise.
	(__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
	(__ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
2017-05-09 21:59:36 +00:00
..
aarch64 Add HWCAP_ASIMDRDM from Linux 4.11 to AArch64 bits/hwcap.h. 2017-05-03 11:04:07 +00:00
alpha Consolidate Linux select implementation 2017-05-03 10:36:36 -03:00
arm Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
bits Add PF_SMC, AF_SMC from Linux 4.11 to bits/socket.h. 2017-05-01 15:11:33 +00:00
generic Consolidate Linux epoll_wait syscall 2017-05-03 10:36:43 -03:00
hppa Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
i386 Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
ia64 Assume that accept4 is always available and works 2017-04-19 07:44:48 +02:00
include/sys
m68k Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
microblaze Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
mips Use __glibc_reserved convention in mcontext, sigcontext (bug 21457). 2017-05-04 11:26:33 +00:00
net
netash
netatalk
netax25
neteconet
netinet
netipx
netiucv
netpacket
netrom
netrose
nfs
nios2 Consolidate Linux send implementation 2017-03-09 15:22:06 +01:00
powerpc Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
s390 Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
scsi
sh Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
sparc Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
sys Remove <sys/ultrasound.h> 2017-05-08 14:59:21 +02:00
tile Consolidate Linux send implementation 2017-03-09 15:22:06 +01:00
wordsize-64 Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
x86 Use __glibc_reserved convention in mcontext, sigcontext (bug 21457). 2017-05-04 11:26:33 +00:00
x86_64 Remove __ASSUME_GETCPU_SYSCALL. 2017-05-08 14:36:42 +00:00
Implies
Makefile Remove <sys/ultrasound.h> 2017-05-08 14:59:21 +02:00
Versions
_G_config.h
_exit.c
a.out.h
accept.c
accept4.c Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
access.c
adjtime.c
aio_misc.h
aio_sigqueue.c
arch-fork.h
bind.c
check_native.c Create more sockets with SOCK_CLOEXEC [BZ #15722] 2017-04-19 07:45:04 +02:00
check_pf.c
clock.c
clock_getcpuclockid.c
clock_getres.c
clock_gettime.c
clock_nanosleep.c
clock_settime.c
cmsg_nxthdr.c
configure
configure.ac
connect.c
createthread.c
default-sched.h
device-nrs.h
dl-brk.c
dl-execstack.c
dl-fxstatat64.c
dl-getcwd.c
dl-librecon.h
dl-openat64.c
dl-opendir.c
dl-origin.c
dl-osinfo.h
dl-sbrk.c
dl-sysdep.c
dl-sysdep.h
dl-vdso.c
dl-vdso.h
dl-writev.h
epoll_pwait.c
epoll_wait.c Consolidate Linux epoll_wait syscall 2017-05-03 10:36:43 -03:00
errqueue.h
eventfd_read.c
eventfd_write.c
exit-thread.h
faccessat.c
fallocate.c
fallocate64.c
fatal-prepare.h
fchmodat.c
fcntl.c
fd_to_filename.h
fexecve.c
fips-private.h
fpathconf.c
fstatfs64.c
fstatvfs.c
fstatvfs64.c
ftime.c
ftruncate.c
ftruncate64.c
futex-internal.h
futimens.c
futimes.c
futimesat.c
fxstat.c
fxstat64.c
fxstatat.c
fxstatat64.c
gai_sigqueue.c
getclktck.c
getcwd.c
getdents.c
getdents64.c
getdirentries.c
getdirentries64.c
getdtsz.c
getentropy.c
gethostid.c
getipv4sourcefilter.c
getloadavg.c
getlogin.c
getlogin_r.c
getpagesize.c
getpeername.c
getpriority.c
getpt.c
getrandom.c
getrlimit.c
getrlimit64.c Assume prlimit64 is available. 2017-05-09 14:05:09 +00:00
getsockname.c
getsockopt.c
getsourcefilter.c
getsysstats.c
gettimeofday.c
grantpt.c
if_index.c
ifaddrs.c Create more sockets with SOCK_CLOEXEC [BZ #15722] 2017-04-19 07:45:04 +02:00
ifreq.c
internal_statvfs.c
internal_statvfs64.c
ipc_ops.h
ipc_priv.h
kernel-features.h Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
kernel-posix-cpu-timers.h
kernel-posix-timers.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
ldd-rewrite.sed
lddlibc4.c
ldsodefs.h
libc_fatal.c
linux_fsinfo.h
listen.c
local-setxid.h
lowlevellock-futex.h
lseek.c
lseek64.c
lutimes.c
lxstat.c
lxstat64.c
malloc-sysdep.h
mmap.c Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
mmap64.c Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
mmap_internal.h Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
mq_close.c
mq_getattr.c
mq_notify.c
mq_open.c
mq_receive.c
mq_send.c
mq_unlink.c
msgctl.c
msgget.c
msgrcv.c
msgsnd.c
netlink_assert_response.c
netlinkaccess.h
nice.c
not-cancel.h
nptl-signals.h
nscd_setup_thread.c
ntp_gettime.c
ntp_gettimex.c
open64.c
openat.c
openat64.c
opendir.c
opensock.c
pathconf.c
pathconf.h
paths.h
personality.c
poll.c Consolidate Linux poll implementation 2017-05-03 10:36:01 -03:00
posix_fadvise.c
posix_fadvise64.c
posix_fallocate.c
posix_fallocate64.c
posix_madvise.c
ppoll.c
pread.c posix: Fix internal p{read,write} plt usage 2017-05-02 14:57:40 -03:00
pread64.c posix: Fix internal p{read,write} plt usage 2017-05-02 14:57:40 -03:00
preadv.c
preadv64.c
prlimit.c Assume prlimit64 is available. 2017-05-09 14:05:09 +00:00
prof-freq.c
profil.c
pselect.c
pt-raise.c
pthread-pids.h
pthread_getaffinity.c
pthread_getcpuclockid.c
pthread_getname.c
pthread_kill.c
pthread_setaffinity.c
pthread_setname.c
pthread_sigmask.c
pthread_sigqueue.c
ptrace.c
ptsname.c
pwrite.c posix: Fix internal p{read,write} plt usage 2017-05-02 14:57:40 -03:00
pwrite64.c
pwritev.c
pwritev64.c
raise.c
readahead.c
readdir64.c
readdir64_r.c
readonly-area.c
reboot.c
recv.c
recvfrom.c
recvmmsg.c Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
recvmsg.c
remove.c
rename.c
renameat.c
sa_len.c
safe-fatal.h
sched_getaffinity.c
sched_getcpu.c
sched_setaffinity.c
segfault.c
select.c Consolidate Linux select implementation 2017-05-03 10:36:36 -03:00
semctl.c
semget.c
semop.c
semtimedop.c
send.c Consolidate Linux send implementation 2017-03-09 15:22:06 +01:00
sendmmsg.c Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
sendmsg.c
sendto.c
setegid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
seteuid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setgid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setgroups.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
sethostid.c
setipv4sourcefilter.c
setregid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setresgid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setresuid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setreuid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setrlimit.c Assume prlimit64 is available. 2017-05-09 14:05:09 +00:00
setrlimit64.c Assume prlimit64 is available. 2017-05-09 14:05:09 +00:00
setsockopt.c
setsourcefilter.c
setuid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
shlib-versions
shm-directory.c
shmat.c
shmctl.c
shmdt.c
shmget.c
shutdown.c
sigaction.c
siglist.h
signal.c
signalfd.c
sigpending.c
sigprocmask.c
sigqueue.c
sigreturn.c
sigset-cvt-mask.h
sigstack.c
sigsuspend.c
sigtimedwait.c
sigwait.c
sigwaitinfo.c
sizes.h
socket.c
socketcall.h
socketpair.c
spawni.c posix: Remove ununsed posix_spawn internal assignment 2017-04-25 08:51:21 -03:00
speed.c
statfs64.c
statvfs.c
statvfs64.c
sync_file_range.c
syscalls.list Consolidate Linux epoll_wait syscall 2017-05-03 10:36:43 -03:00
sysconf.c
sysctl.c
sysctl.mk
sysdep-vdso.h
sysdep.h Consolidate Linux send implementation 2017-03-09 15:22:06 +01:00
syslog.c
system.c
tcdrain.c
tcflow.c
tcflush.c
tcgetattr.c
tcgetpgrp.c
tcsendbrk.c
tcsetattr.c
tcsetpgrp.c
termio.h
test-errno-linux.c Fix more test-errno issues 2017-03-30 18:23:43 -03:00
time.c
timer_create.c
timer_delete.c
timer_getoverr.c
timer_gettime.c
timer_routines.c
timer_settime.c
times.c
timespec_get.c
truncate.c
truncate64.c
tst-affinity-pid.c
tst-affinity.c
tst-align-clone.c
tst-clone.c
tst-clone2.c
tst-fallocate-common.c
tst-fallocate.c
tst-fallocate64.c
tst-fanotify.c
tst-getpid1.c
tst-personality.c
tst-quota.c
tst-setgetname.c Remove __ASSUME_PROC_PID_TASK_COMM. 2017-05-08 16:44:54 +00:00
tst-skeleton-affinity.c
tst-skeleton-thread-affinity.c
tst-sync_file_range.c
tst-thread-affinity-pthread.c
tst-thread-affinity-pthread2.c
tst-thread-affinity-sched.c
ttyname.c linux ttyname and ttyname_r: do not return wrong results 2017-03-19 17:36:13 +00:00
ttyname.h linux ttyname and ttyname_r: do not return wrong results 2017-03-19 17:36:13 +00:00
ttyname_r.c linux ttyname and ttyname_r: do not return wrong results 2017-03-19 17:36:13 +00:00
ualarm.c
umount.S
umount2.S
unlockpt.c
updwtmp.c
ustat.c
utimensat.c
utimes.c
utmp_file.c
vfork.c
wait.c
wait3.c
waitid.c
waitpid.c
xmknod.c
xmknodat.c
xstat.c
xstat64.c
xstatconv.c
xstatconv.h