about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-05-09 21:59:36 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-05-09 21:59:36 +0000
commite3b0580d0d66fbdfc2086c20304c0129f9a5297e (patch)
tree03e1a6ebdbd8a1362126d9e1fced9c5eda7d9640 /ChangeLog
parenteab380d8ec9884e90232dceba24161e63ddd26b8 (diff)
downloadglibc-e3b0580d0d66fbdfc2086c20304c0129f9a5297e.tar.gz
glibc-e3b0580d0d66fbdfc2086c20304c0129f9a5297e.tar.xz
glibc-e3b0580d0d66fbdfc2086c20304c0129f9a5297e.zip
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.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog27
1 files changed, 27 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index dc0f8f6643..90aed79f8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2017-05-09  Joseph Myers  <joseph@codesourcery.com>
+
+	* 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  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
 	* posix/Makefile (headers): Add pthreadtypes-arch.h and