From 016495b818cb61df7d0d10e6db54074271b3e3a5 Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Mon, 9 Nov 2015 16:14:49 +0100 Subject: S390: Call direct system calls for socket operations. this patch calls direct system calls for socket operations in the same way as power does. The system calls were introduced in kernel commit https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=977108f89c989b1eeb5c8d938e1e71913391eb5f. There are no direct recv, send, accept syscalls available on s390. Thus recvfrom, sendto, accept4 are called instead of the socketcall by defining __ASSUME_*_FOR_*_SYSCALL macros. See recv.c, send.c, accept.c in sysdeps/unix/sysv/linux/ folder. The socketcalls in syscalls.list for s390-64 are removed. They were never used on s390x. ChangeLog: * sysdeps/unix/sysv/linux/s390/kernel-features.h: (__ASSUME_*_SYSCALL) Define new macros. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Remove socketcall syscalls. * sysdeps/unix/sysv/linux/accept.c (__libc_accept): Use accept4 if defined __ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL. * sysdeps/unix/sysv/linux/recv.c (__libc_recv): Use recvfrom if defined __ASSUME_RECVFROM_FOR_RECV_SYSCALL. * sysdeps/unix/sysv/linux/send.c (__libc_send): Use sendto if defined __ASSUME_SENDTO_FOR_SEND_SYSCALL. --- sysdeps/unix/sysv/linux/recv.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sysdeps/unix/sysv/linux/recv.c') diff --git a/sysdeps/unix/sysv/linux/recv.c b/sysdeps/unix/sysv/linux/recv.c index 12be89053d..ce701b59c5 100644 --- a/sysdeps/unix/sysv/linux/recv.c +++ b/sysdeps/unix/sysv/linux/recv.c @@ -29,6 +29,8 @@ __libc_recv (int fd, void *buf, size_t len, int flags) { #ifdef __ASSUME_RECV_SYSCALL return SYSCALL_CANCEL (recv, fd, buf, len, flags); +#elif defined __ASSUME_RECVFROM_FOR_RECV_SYSCALL + return SYSCALL_CANCEL (recvfrom, fd, buf, len, flags, NULL, NULL); #else return SOCKETCALL_CANCEL (recv, fd, buf, len, flags); #endif -- cgit v1.2.3-70-g09d2