This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.25-347-g332e01c


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  332e01c6276e05ece5953007c98aa84725c4fda4 (commit)
       via  a5fdd305970adc9b245f97dd18ff813efea36484 (commit)
       via  a5a34d2eaf717fb95a33553170000fb147ded444 (commit)
       via  afbbc18f9e253194cd05252a8d3b93fe97a777c1 (commit)
       via  ecade1cb0b9d5139498ccd7a5d4aa4c1cc870231 (commit)
       via  fdbb0d98bae4c3f62e5893b9194456cae61bd1d2 (commit)
       via  51209cbf51192d4a2c337a41ddb6eebc7472c021 (commit)
       via  3c9399f507dba9547e9d193dbdca87fbd4f586df (commit)
       via  b3b00aa8b0c510db1aec831f47c21e33a6d814be (commit)
       via  2de15b61e92c76bcb21df1140f20a62dc6d3cc39 (commit)
       via  3d0ad5a8dfb7b8dd862108970a62c2c3ce9ddd72 (commit)
       via  ebfdb12bf0b6a8eccbee28335d0e6297d8b874d1 (commit)
       via  88499a87cef0a70f381524b9c4951b53bc5184e3 (commit)
      from  a7fbedff76494b5b694f647e9c681cf8988056ce (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=332e01c6276e05ece5953007c98aa84725c4fda4

commit 332e01c6276e05ece5953007c98aa84725c4fda4
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Nov 4 10:40:20 2015 -0200

    posix: Consolidate Linux mq_timedsend syscall
    
    This patch consolidates the mq_timedsend Linux syscall generation
    on sysdeps/unix/sysv/linux/mq_timedsend.c.  It basically removes it
    from architecture auto-generation list.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* rt/Makefile (CFLAGS-mq_timedsend.c): New flag.
    	* sysdeps/unix/sysv/linux/mq_timedsend.c: New file.
    	* sysdeps/unix/sysv/linux/syscalls.list (mq_timedsend): Remove from
    	auto-generation list.

diff --git a/ChangeLog b/ChangeLog
index 65784a9..527e4e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* rt/Makefile (CFLAGS-mq_timedsend.c): New flag.
+	* sysdeps/unix/sysv/linux/mq_timedsend.c: New file.
+	* sysdeps/unix/sysv/linux/syscalls.list (mq_timedsend): Remove from
+	auto-generation list.
+
 	* rt/Makefile (CFLAGS-mq_timedreceive.c): New flag.
 	* sysdeps/unix/sysv/linux/mq_timedreceive.c: New file.
 	* sysdeps/unix/sysv/linux/syscalls.list (mq_timedreceive): Remove
diff --git a/rt/Makefile b/rt/Makefile
index 0ffa12d..9740dc2 100644
--- a/rt/Makefile
+++ b/rt/Makefile
@@ -62,6 +62,7 @@ include ../Rules
 
 CFLAGS-aio_suspend.c = -fexceptions
 CFLAGS-mq_timedreceive.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-mq_timedsend.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-clock_nanosleep.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-librt-cancellation.c = -fasynchronous-unwind-tables
 
diff --git a/sysdeps/unix/sysv/linux/mq_timedsend.c b/sysdeps/unix/sysv/linux/mq_timedsend.c
new file mode 100644
index 0000000..7995554
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mq_timedsend.c
@@ -0,0 +1,33 @@
+/* Send a message to a message queue with a timeout.  Linux version.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <mqueue.h>
+#include <sysdep-cancel.h>
+
+/* Add message pointed by MSG_PTR to message queue MQDES, stop blocking
+   on full message queue if ABS_TIMEOUT expires.  */
+int
+__mq_timedsend (mqd_t mqdes, const char *msg_ptr, size_t msg_len,
+		unsigned int msg_prio, const struct timespec *abs_timeout)
+{
+  return SYSCALL_CANCEL (mq_timedsend, mqdes, msg_ptr, msg_len, msg_prio,
+			 abs_timeout);
+}
+hidden_def (__mq_timedsend)
+weak_alias (__mq_timedsend, mq_timedsend)
+hidden_weak (mq_timedsend)
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 63914bc..8bfb080 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -95,7 +95,6 @@ removexattr	-	removexattr	i:ss	removexattr
 lremovexattr	-	lremovexattr	i:ss	lremovexattr
 fremovexattr	-	fremovexattr	i:is	fremovexattr
 
-mq_timedsend	-	mq_timedsend	Ci:ipiip	__mq_timedsend	mq_timedsend
 mq_setattr	-	mq_getsetattr	i:ipp	mq_setattr
 
 timerfd_create	EXTRA	timerfd_create	i:ii	timerfd_create

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5fdd305970adc9b245f97dd18ff813efea36484

commit a5fdd305970adc9b245f97dd18ff813efea36484
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Wed Nov 4 10:32:58 2015 -0200

    posix: Consolidate Linux mq_timedreceive syscall
    
    This patch consolidates the mq_timedreceive Linux syscall generation
    on sysdeps/unix/sysv/linux/mq_timedreceive.c.  It basically removes it
    from architecture auto-generation list.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* rt/Makefile (CFLAGS-mq_timedreceive.c): New flag.
    	* sysdeps/unix/sysv/linux/mq_timedreceive.c: New file.
    	* sysdeps/unix/sysv/linux/syscalls.list (mq_timedreceive): Remove
    	from auto-generation list.

diff --git a/ChangeLog b/ChangeLog
index 3e846a0..65784a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* rt/Makefile (CFLAGS-mq_timedreceive.c): New flag.
+	* sysdeps/unix/sysv/linux/mq_timedreceive.c: New file.
+	* sysdeps/unix/sysv/linux/syscalls.list (mq_timedreceive): Remove
+	from auto-generation list.
+
 	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
 	open_by_handle_at.
 	(CFLAGS-open_by_handle_at.c): New flag.
diff --git a/rt/Makefile b/rt/Makefile
index 5283839..0ffa12d 100644
--- a/rt/Makefile
+++ b/rt/Makefile
@@ -61,6 +61,7 @@ extra-libs-others := $(extra-libs)
 include ../Rules
 
 CFLAGS-aio_suspend.c = -fexceptions
+CFLAGS-mq_timedreceive.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-clock_nanosleep.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-librt-cancellation.c = -fasynchronous-unwind-tables
 
diff --git a/sysdeps/unix/sysv/linux/mq_timedreceive.c b/sysdeps/unix/sysv/linux/mq_timedreceive.c
new file mode 100644
index 0000000..6d1c145
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mq_timedreceive.c
@@ -0,0 +1,34 @@
+/* Receive a message from a message queue with a timeout.  Linux version.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <mqueue.h>
+#include <sysdep-cancel.h>
+
+/* Receive the oldest from highest priority messages in message queue
+   MQDES, stop waiting if ABS_TIMEOUT expires.  */
+ssize_t
+__mq_timedreceive (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len,
+		   unsigned int *__restrict msg_prio,
+		   const struct timespec *__restrict abs_timeout)
+{
+  return SYSCALL_CANCEL (mq_timedreceive, mqdes, msg_ptr, msg_len, msg_prio,
+			 abs_timeout);
+}
+hidden_def (__mq_timedreceive)
+weak_alias (__mq_timedreceive, mq_timedreceive)
+hidden_weak (mq_timedreceive)
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index a8d1299..63914bc 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -96,7 +96,6 @@ lremovexattr	-	lremovexattr	i:ss	lremovexattr
 fremovexattr	-	fremovexattr	i:is	fremovexattr
 
 mq_timedsend	-	mq_timedsend	Ci:ipiip	__mq_timedsend	mq_timedsend
-mq_timedreceive	-	mq_timedreceive	Ci:ipipp	__mq_timedreceive	mq_timedreceive
 mq_setattr	-	mq_getsetattr	i:ipp	mq_setattr
 
 timerfd_create	EXTRA	timerfd_create	i:ii	timerfd_create

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5a34d2eaf717fb95a33553170000fb147ded444

commit a5a34d2eaf717fb95a33553170000fb147ded444
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Nov 2 11:42:09 2015 -0200

    linux: Consolidate Linux open_by_handle_at syscall
    
    This patch consolidates the open_by_handle_at Linux syscall generation on
    sysdeps/unix/sysv/linux/open_by_handle_at.c.  It basically removes it from
    architectures auto-generation list.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
    	open_by_handle_at.
    	(CFLAGS-open_by_handle_at.c): New flag.
    	* sysdeps/unix/sysv/linux/open_by_handle_at.c: New file.
    	* sysdeps/unix/sysv/linux/syscalls.list (open_by_handle_at): New
    	file.
    	* misc/Makefile (CFLAGS-open_by_handle_at.c): New rule.

diff --git a/ChangeLog b/ChangeLog
index 0ce0063..3e846a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
+	open_by_handle_at.
+	(CFLAGS-open_by_handle_at.c): New flag.
+	* sysdeps/unix/sysv/linux/open_by_handle_at.c: New file.
+	* sysdeps/unix/sysv/linux/syscalls.list (open_by_handle_at): New
+	file.
+	* misc/Makefile (CFLAGS-open_by_handle_at.c): New rule.
+
 	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add splice.
 	(CFLAGS-splice.c): New flag.
 	* sysdeps/unix/sysv/linux/splice.c: New file.
diff --git a/misc/Makefile b/misc/Makefile
index e4fe468..38beb00 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -113,6 +113,7 @@ CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-fsync.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-vmsplice.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-splice.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-open_by_handle_at.c = -fexceptions -fasynchronous-unwind-tables
 
 # Called during static library initialization, so turn stack-protection
 # off for non-shared builds.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index c1f6e24..45c05f1 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -17,7 +17,8 @@ include $(firstword $(wildcard $(sysdirs:=/sysctl.mk)))
 sysdep_routines += clone umount umount2 readahead \
 		   setfsuid setfsgid epoll_pwait signalfd \
 		   eventfd eventfd_read eventfd_write prlimit \
-		   personality epoll_wait tee vmsplice splice
+		   personality epoll_wait tee vmsplice splice \
+		   open_by_handle_at
 
 CFLAGS-gethostid.c = -fexceptions
 CFLAGS-tee.c = -fexceptions -fasynchronous-unwind-tables
diff --git a/sysdeps/unix/sysv/linux/open_by_handle_at.c b/sysdeps/unix/sysv/linux/open_by_handle_at.c
new file mode 100644
index 0000000..e69f041
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/open_by_handle_at.c
@@ -0,0 +1,37 @@
+/* Obtain handle for an open file via a handle.  Linux implementation.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sysdep-cancel.h>
+
+int
+open_by_handle_at (int mount_fd, struct file_handle *handle, int flags)
+{
+#ifdef __NR_open_by_handle_at
+  return SYSCALL_CANCEL (open_by_handle_at, mount_fd, handle, flags);
+#else
+  __set_errno (ENOSYS);
+  return -1;
+#endif
+}
+
+#ifndef __NR_open_by_handle_at
+stub_warning (open_by_handle_at)
+#endif
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index b40825a..a8d1299 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -106,7 +106,6 @@ timerfd_gettime	EXTRA	timerfd_gettime	i:ip	timerfd_gettime
 fanotify_init	EXTRA	fanotify_init	i:ii	fanotify_init
 
 name_to_handle_at EXTRA	name_to_handle_at i:isppi name_to_handle_at
-open_by_handle_at EXTRA	open_by_handle_at Ci:ipi  open_by_handle_at
 
 setns		EXTRA	setns		i:ii	setns
 

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=afbbc18f9e253194cd05252a8d3b93fe97a777c1

commit afbbc18f9e253194cd05252a8d3b93fe97a777c1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Nov 2 11:22:30 2015 -0200

    linux: Consolidate Linux splice syscall
    
    This patch consolidates the splice Linux syscall generation on
    sysdeps/unix/sysv/linux/splice.c.  It basically removes it from
    architectures auto-generation list.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add splice.
    	(CFLAGS-splice.c): New flag.
    	* sysdeps/unix/sysv/linux/splice.c: New file.
    	* sysdeps/unix/sysv/linux/syscalls.list (splice): Remove from
    	auto-generation syscall list.
    	* misc/Makefile (CFLAGS-splice.c): New rule.

diff --git a/ChangeLog b/ChangeLog
index bc92bfc..0ce0063 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add splice.
+	(CFLAGS-splice.c): New flag.
+	* sysdeps/unix/sysv/linux/splice.c: New file.
+	* sysdeps/unix/sysv/linux/syscalls.list (splice): Remove from
+	auto-generation syscall list.
+	* misc/Makefile (CFLAGS-splice.c): New rule.
+
 	* sysdeps/unix/sysv/linux/Makefile (CFLAGS-vmsplice.c): New flag.
 	* sysdeps/unix/sysv/linux/syscalls.list (vmsplice): Remove from
 	auto-generation syscall list.
diff --git a/misc/Makefile b/misc/Makefile
index c4a75b5..e4fe468 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -112,6 +112,7 @@ CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-fsync.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-vmsplice.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-splice.c = -fexceptions -fasynchronous-unwind-tables
 
 # Called during static library initialization, so turn stack-protection
 # off for non-shared builds.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 7d1f3d3..c1f6e24 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -17,7 +17,7 @@ include $(firstword $(wildcard $(sysdirs:=/sysctl.mk)))
 sysdep_routines += clone umount umount2 readahead \
 		   setfsuid setfsgid epoll_pwait signalfd \
 		   eventfd eventfd_read eventfd_write prlimit \
-		   personality epoll_wait tee vmsplice
+		   personality epoll_wait tee vmsplice splice
 
 CFLAGS-gethostid.c = -fexceptions
 CFLAGS-tee.c = -fexceptions -fasynchronous-unwind-tables
diff --git a/sysdeps/unix/sysv/linux/splice.c b/sysdeps/unix/sysv/linux/splice.c
new file mode 100644
index 0000000..2aaf878
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/splice.c
@@ -0,0 +1,27 @@
+/* Splice data to/from a pipe Linux implementation.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fcntl.h>
+#include <sysdep-cancel.h>
+
+ssize_t
+splice (int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len,
+	unsigned int flags)
+{
+  return SYSCALL_CANCEL (splice, fd_in, off_in, fd_out, off_out, len, flags);
+}
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 9d7bd65..b40825a 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -64,7 +64,6 @@ setfsgid	EXTRA	setfsgid	i:i	setfsgid
 setfsuid	EXTRA	setfsuid	i:i	setfsuid
 setpgid		-	setpgid		i:ii	__setpgid	setpgid
 sigaltstack	-	sigaltstack	i:PP	__sigaltstack	sigaltstack
-splice		EXTRA	splice		Ci:iPiPii	splice
 stime		-	stime		i:p	stime
 sysinfo		EXTRA	sysinfo		i:p	__sysinfo	sysinfo
 swapon		-	swapon		i:si	__swapon	swapon

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ecade1cb0b9d5139498ccd7a5d4aa4c1cc870231

commit ecade1cb0b9d5139498ccd7a5d4aa4c1cc870231
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Nov 2 11:13:24 2015 -0200

    linux: Consolidate Linux vmsplice syscall
    
    This patch consolidates the vmsplice Linux syscall generation on
    sysdeps/unix/sysv/linux/vmsplice.c.  It basically removes it from
    architectures auto-generation list.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* sysdeps/unix/sysv/linux/Makefile (CFLAGS-vmsplice.c): New flag.
    	* sysdeps/unix/sysv/linux/syscalls.list (vmsplice): Remove from
    	auto-generation syscall list.
    	* sysdeps/unix/sysv/linux/vmsplice.c: New file.
    	* misc/Makefile (CFLAGS-vmsplice.c): New rule.

diff --git a/ChangeLog b/ChangeLog
index b04b779..bc92bfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* sysdeps/unix/sysv/linux/Makefile (CFLAGS-vmsplice.c): New flag.
+	* sysdeps/unix/sysv/linux/syscalls.list (vmsplice): Remove from
+	auto-generation syscall list.
+	* sysdeps/unix/sysv/linux/vmsplice.c: New file.
+	* misc/Makefile (CFLAGS-vmsplice.c): New rule.
+
 	* misc/Makefile (CFLAGS-fsync.c): New flag.
 	* nptl/Makefile (CFLAGS-fsync.c): Likewise.
 	* sysdeps/unix/syscalls.list (fsync): Remove from auto-generation
diff --git a/misc/Makefile b/misc/Makefile
index 2db1fd8..c4a75b5 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -111,6 +111,7 @@ CFLAGS-tst-tsearch.c = $(stack-align-test-flags)
 CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-fsync.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-vmsplice.c = -fexceptions -fasynchronous-unwind-tables
 
 # Called during static library initialization, so turn stack-protection
 # off for non-shared builds.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 9388623..7d1f3d3 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -17,7 +17,7 @@ include $(firstword $(wildcard $(sysdirs:=/sysctl.mk)))
 sysdep_routines += clone umount umount2 readahead \
 		   setfsuid setfsgid epoll_pwait signalfd \
 		   eventfd eventfd_read eventfd_write prlimit \
-		   personality epoll_wait tee
+		   personality epoll_wait tee vmsplice
 
 CFLAGS-gethostid.c = -fexceptions
 CFLAGS-tee.c = -fexceptions -fasynchronous-unwind-tables
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index c69eff4..9d7bd65 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -72,7 +72,6 @@ swapoff		-	swapoff		i:s	__swapoff	swapoff
 unshare		EXTRA	unshare		i:i	unshare
 uselib		EXTRA	uselib		i:s	__compat_uselib	uselib@GLIBC_2.0:GLIBC_2.23
 utime		-	utime		i:sP	utime
-vmsplice	EXTRA	vmsplice	Ci:iPii	vmsplice
 wait4		-	wait4		i:iWiP	__wait4		wait4
 
 chown		-	chown		i:sii	__libc_chown	__chown chown
diff --git a/sysdeps/unix/sysv/linux/vmsplice.c b/sysdeps/unix/sysv/linux/vmsplice.c
new file mode 100644
index 0000000..01dac13
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/vmsplice.c
@@ -0,0 +1,27 @@
+/* Splice user pages into a pipe Linux implementation.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fcntl.h>
+#include <sys/uio.h>
+#include <sysdep-cancel.h>
+
+ssize_t
+vmsplice (int fd, const struct iovec *iov, size_t count, unsigned int flags)
+{
+  return SYSCALL_CANCEL (vmsplice, fd, iov, count, flags);
+}

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fdbb0d98bae4c3f62e5893b9194456cae61bd1d2

commit fdbb0d98bae4c3f62e5893b9194456cae61bd1d2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Nov 2 12:14:35 2015 -0200

    posix: Consolidate Linux fsync syscall
    
    This patch consolidates the fsync Linux syscall generation on
    sysdeps/unix/sysv/linux/fsync.c.  It basically removes it from
    architectures auto-generation list.
    
    For arm it also removes the __errno_location call since fsync
    is not called with SYSCALL_CANCEL with call arch-specific
    INLINE_SYSCALL macro which in turn will call __set_errno macro
    (and setting errno directly).
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* misc/Makefile (CFLAGS-fsync.c): New flag.
    	* nptl/Makefile (CFLAGS-fsync.c): Likewise.
    	* sysdeps/unix/syscalls.list (fsync): Remove from auto-generation
    	syscall list.
    	* sysdeps/unix/sysv/linux/fsync.c: New file.
    	* sysdeps/unix/sysv/linux/arm/localplt.data [libpthread.so]
    	(__errno_location): Remove.

diff --git a/ChangeLog b/ChangeLog
index 6e88eef..b04b779 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* misc/Makefile (CFLAGS-fsync.c): New flag.
+	* nptl/Makefile (CFLAGS-fsync.c): Likewise.
+	* sysdeps/unix/syscalls.list (fsync): Remove from auto-generation
+	syscall list.
+	* sysdeps/unix/sysv/linux/fsync.c: New file.
+	* sysdeps/unix/sysv/linux/arm/localplt.data [libpthread.so]
+	(__errno_location): Remove.
+
 	* misc/Makefile (CFLAGS-fdatasync.c): New rule.
 	* nptl/Makefile (CFLAGS-fdatasync.c): Likewise.
 	* sysdeps/unix/syscalls.list: Remove fdatasync from auto-generation
diff --git a/misc/Makefile b/misc/Makefile
index a777ece..2db1fd8 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -110,6 +110,7 @@ CFLAGS-err.c = -fexceptions
 CFLAGS-tst-tsearch.c = $(stack-align-test-flags)
 CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-fsync.c = -fexceptions -fasynchronous-unwind-tables
 
 # Called during static library initialization, so turn stack-protection
 # off for non-shared builds.
diff --git a/nptl/Makefile b/nptl/Makefile
index 90eac7c..eeadf4c 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -220,6 +220,7 @@ CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-sigsuspend.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-fsync.c = -fexceptions -fasynchronous-unwind-tables
 
 CFLAGS-pt-system.c = -fexceptions
 
diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list
index c4135d8..61e5360 100644
--- a/sysdeps/unix/syscalls.list
+++ b/sysdeps/unix/syscalls.list
@@ -19,7 +19,6 @@ fchmod		-	fchmod		i:ii	__fchmod	fchmod
 fchown		-	fchown		i:iii	__fchown	fchown
 fcntl		-	fcntl		Ci:iiF	__libc_fcntl	__fcntl fcntl
 fstatfs		-	fstatfs		i:ip	__fstatfs	fstatfs
-fsync		-	fsync		Ci:i	__libc_fsync	fsync
 ftruncate	-	ftruncate	i:ii	__ftruncate	ftruncate
 getdomain	-	getdomainname	i:si	getdomainname
 getgid		-	getgid		Ei:	__getgid	getgid
diff --git a/sysdeps/unix/sysv/linux/arm/localplt.data b/sysdeps/unix/sysv/linux/arm/localplt.data
index 8bc876d..19d3299 100644
--- a/sysdeps/unix/sysv/linux/arm/localplt.data
+++ b/sysdeps/unix/sysv/linux/arm/localplt.data
@@ -5,7 +5,6 @@ libc.so: memalign
 libc.so: raise
 libc.so: realloc
 libm.so: matherr
-libpthread.so: __errno_location
 libpthread.so: raise
 # The dynamic loader needs __tls_get_addr for TLS.
 ld.so: __tls_get_addr
diff --git a/sysdeps/unix/sysv/linux/fsync.c b/sysdeps/unix/sysv/linux/fsync.c
new file mode 100644
index 0000000..ac4827b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/fsync.c
@@ -0,0 +1,28 @@
+/* Synchronize a file's in-core state with storage device Linux
+   implementation.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+#include <sysdep-cancel.h>
+
+/* Make all changes done to FD actually appear on disk.  */
+int
+fsync (int fd)
+{
+  return SYSCALL_CANCEL (fsync, fd);
+}

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51209cbf51192d4a2c337a41ddb6eebc7472c021

commit 51209cbf51192d4a2c337a41ddb6eebc7472c021
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Nov 2 11:00:39 2015 -0200

    posix: Consolidate Linux fdatasync syscall
    
    This patch consolidates the fdatasync Linux syscall generation on
    sysdeps/unix/sysv/linux/fdatasync.c.  It basically removes it from
    architectures auto-generation list.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* misc/makefile (CFLAGS-datasync.c): New flag.
    	* nptl/makefile (CFLAGS-datasync.c): Likewise.
    	* sysdeps/unix/sysv/linux/syscalls.list (fdatasync): Remove from
    	auto-generation syscall list.
    	* sysdeps/unix/sysv/linux/fdatasync.c: New file.

diff --git a/ChangeLog b/ChangeLog
index caaf605..6e88eef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* misc/Makefile (CFLAGS-fdatasync.c): New rule.
+	* nptl/Makefile (CFLAGS-fdatasync.c): Likewise.
+	* sysdeps/unix/syscalls.list: Remove fdatasync from auto-generation
+	list.
+	* sysdeps/unix/sysv/linux/fdatasync.c: New file.
+
 	* misc/Makefile (CFLAGS-msync.c): New rule.
 	* nptl/Makefile (CFLAGS-msync.c): Likewise.
 	* sysdeps/unix/syscalls.list: Remove msync from auto-generation list.
diff --git a/misc/Makefile b/misc/Makefile
index 0c1526a..a777ece 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -109,6 +109,7 @@ CFLAGS-getusershell.c = -fexceptions
 CFLAGS-err.c = -fexceptions
 CFLAGS-tst-tsearch.c = $(stack-align-test-flags)
 CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables
 
 # Called during static library initialization, so turn stack-protection
 # off for non-shared builds.
diff --git a/nptl/Makefile b/nptl/Makefile
index 3ade74f..90eac7c 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -219,6 +219,7 @@ CFLAGS-write.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-sigsuspend.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables
 
 CFLAGS-pt-system.c = -fexceptions
 
diff --git a/sysdeps/unix/sysv/linux/fdatasync.c b/sysdeps/unix/sysv/linux/fdatasync.c
new file mode 100644
index 0000000..09a07fb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/fdatasync.c
@@ -0,0 +1,29 @@
+/* Synchronize a file's in-core state with storage device Linux
+   implementation.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <unistd.h>
+#include <sysdep-cancel.h>
+
+/* Synchronize at least the data part of a file with the underlying
+   media.  */
+int
+fdatasync (int fd)
+{
+  return SYSCALL_CANCEL (fdatasync, fd);
+}
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index ae99acd..c69eff4 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -13,7 +13,6 @@ epoll_create1	EXTRA	epoll_create1	i:i	epoll_create1
 epoll_ctl	EXTRA	epoll_ctl	i:iiip	epoll_ctl
 eventfd		EXTRA	eventfd2	i:ii	eventfd
 execve		-	execve		i:spp	__execve	execve
-fdatasync	-	fdatasync	Ci:i	fdatasync
 flock		-	flock		i:ii	__flock		flock
 get_kernel_syms	EXTRA	get_kernel_syms	i:p	__compat_get_kernel_syms	get_kernel_syms@GLIBC_2.0:GLIBC_2.23
 getpid          -       getpid          Ei:     __getpid        getpid

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3c9399f507dba9547e9d193dbdca87fbd4f586df

commit 3c9399f507dba9547e9d193dbdca87fbd4f586df
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Nov 2 10:53:29 2015 -0200

    posix: Consolidate Linux msync syscall
    
    This patch consolidates the msync Linux syscall generation on
    sysdeps/unix/sysv/linux/msync.c.  It basically removes it from
    architectures auto-generation list.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* misc/Makefile (CFLAGS-msync.c): New rule.
    	* nptl/Makefile (CFLAGS-msync.c): Likewise.
    	* sysdeps/unix/syscalls.list: Remove msync from auto-generation list.
    	* sysdeps/unix/sysv/linux/msync.c: New file.

diff --git a/ChangeLog b/ChangeLog
index 92e1c10..caaf605 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* misc/Makefile (CFLAGS-msync.c): New rule.
+	* nptl/Makefile (CFLAGS-msync.c): Likewise.
+	* sysdeps/unix/syscalls.list: Remove msync from auto-generation list.
+	* sysdeps/unix/sysv/linux/msync.c: New file.
+
 	* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Remove file.
 	* sysdeps/unix/sysv/linux/sigsuspend.c: Simplify include list.
 	* nptl/Makefile (CFLAGS-sigsuspend.c): New rule.
diff --git a/misc/Makefile b/misc/Makefile
index 91e425b..0c1526a 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -108,6 +108,7 @@ CFLAGS-getsysstats.c = -fexceptions
 CFLAGS-getusershell.c = -fexceptions
 CFLAGS-err.c = -fexceptions
 CFLAGS-tst-tsearch.c = $(stack-align-test-flags)
+CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables
 
 # Called during static library initialization, so turn stack-protection
 # off for non-shared builds.
diff --git a/nptl/Makefile b/nptl/Makefile
index 57eab33..3ade74f 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -218,6 +218,7 @@ CFLAGS-read.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-write.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-sigsuspend.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables
 
 CFLAGS-pt-system.c = -fexceptions
 
diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list
index 2254c76..c4135d8 100644
--- a/sysdeps/unix/syscalls.list
+++ b/sysdeps/unix/syscalls.list
@@ -45,7 +45,6 @@ madvise		-	madvise		i:pii	__madvise	madvise
 mkdir		-	mkdir		i:si	__mkdir		mkdir
 mmap		-	mmap		b:aniiii __mmap		mmap
 mprotect	-	mprotect	i:aii	__mprotect	mprotect
-msync		-	msync		Ci:aii	__libc_msync	msync
 munmap		-	munmap		i:ai	__munmap	munmap
 open		-	open		Ci:siv	__libc_open __open open
 profil		-	profil		i:piii	__profil	profil
diff --git a/sysdeps/unix/sysv/linux/msync.c b/sysdeps/unix/sysv/linux/msync.c
new file mode 100644
index 0000000..28aba11
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/msync.c
@@ -0,0 +1,26 @@
+/* Linux synchronize a file with a memory map implementation.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sys/mman.h>
+#include <sysdep-cancel.h>
+
+int
+msync (void *addr, size_t length, int flags)
+{
+  return SYSCALL_CANCEL (msync, addr, length, flags);
+}

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b3b00aa8b0c510db1aec831f47c21e33a6d814be

commit b3b00aa8b0c510db1aec831f47c21e33a6d814be
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Nov 24 10:12:37 2016 -0200

    posix: Consolidate Linux sigsuspend implementation
    
    This patch consolidates the sigsuspend Linux syscall generation on
    sysdeps/unix/sysv/linux/sigsuspend.c.  It basically removes the alpha
    assembly version which call the old sigsusped interface using only
    the first doubleword from sigset. Current minimum supported kernel
    on alpha (3.2) enforces rt_sigsuspend on the architecture
    (__ARCH_WANT_SYS_RT_SIGSUSPEND option on kernel), so it is possible
    to use the default implementation.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Remove file.
    	* sysdeps/unix/sysv/linux/sigsuspend.c: Simplify include list.
    	* nptl/Makefile (CFLAGS-sigsuspend.c): New rule.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
    	(CFLAGS-sigsuspend.c): Remove rule.

diff --git a/ChangeLog b/ChangeLog
index 0c30af6..92e1c10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Remove file.
+	* sysdeps/unix/sysv/linux/sigsuspend.c: Simplify include list.
+	* nptl/Makefile (CFLAGS-sigsuspend.c): New rule.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
+	(CFLAGS-sigsuspend.c): Remove rule.
+
 	* sysdeps/unix/sysv/linux/Makefile (sysdeps_routines): Add tee.
 	(CFLAGS-tee.c): New rule.
 	* sysdeps/unix/sysv/linux/syscalls.list: Remove tee from
diff --git a/nptl/Makefile b/nptl/Makefile
index cdf69bd..57eab33 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -217,6 +217,7 @@ CFLAGS-close.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-read.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-write.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-sigsuspend.c = -fexceptions -fasynchronous-unwind-tables
 
 CFLAGS-pt-system.c = -fexceptions
 
diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
deleted file mode 100644
index c226be1..0000000
--- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Copyright (C) 1993-2017 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David Mosberger <davidm@cs.arizona.edu>, 1995.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-/* sigsuspend is a special syscall since it needs to dereference the
-   sigset.  This will have to change when we have more than 64 signals.  */
-
-#include <sysdep-cancel.h>
-
-#undef PSEUDO_PREPARE_ARGS
-#define PSEUDO_PREPARE_ARGS	ldq	a0, 0(a0);
-
-PSEUDO(__sigsuspend, sigsuspend, 1)
-	ret
-PSEUDO_END(__sigsuspend)
-libc_hidden_def (__sigsuspend)
-weak_alias (__sigsuspend, sigsuspend)
-strong_alias (__sigsuspend, __libc_sigsuspend)
diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c b/sysdeps/unix/sysv/linux/sigsuspend.c
index 8bb0cd4..df29abf 100644
--- a/sysdeps/unix/sysv/linux/sigsuspend.c
+++ b/sysdeps/unix/sysv/linux/sigsuspend.c
@@ -15,12 +15,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
 #include <signal.h>
-#include <unistd.h>
-
 #include <sysdep-cancel.h>
-#include <sys/syscall.h>
 
 /* Change the set of blocked signals to SET,
    wait until a signal arrives, and restore the set of blocked signals.  */
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
index 3a7f4aa..715af3d 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
@@ -7,7 +7,3 @@ LD += -melf64_sparc
 ifeq ($(subdir),stdlib)
 sysdep_routines += __start_context
 endif
-
-ifeq ($(subdir),nptl)
-CFLAGS-sigsuspend.c += -fexceptions
-endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2de15b61e92c76bcb21df1140f20a62dc6d3cc39

commit 2de15b61e92c76bcb21df1140f20a62dc6d3cc39
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Nov 24 09:55:09 2016 -0200

    linux: Consolidate Linux tee implementation
    
    This patch consolidates the tee Linux syscall generation on
    sysdeps/unix/sysv/linux/tee.c.  It basically removes it from
    architectures auto-generation list.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* sysdeps/unix/sysv/linux/Makefile (sysdeps_routines): Add tee.
    	(CFLAGS-tee.c): New rule.
    	* sysdeps/unix/sysv/linux/syscalls.list: Remove tee from
    	auto-generated list.
    	* sysdeps/unix/sysv/linux/tee.c: New file.

diff --git a/ChangeLog b/ChangeLog
index 7bc0ce4..0c30af6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* sysdeps/unix/sysv/linux/Makefile (sysdeps_routines): Add tee.
+	(CFLAGS-tee.c): New rule.
+	* sysdeps/unix/sysv/linux/syscalls.list: Remove tee from
+	auto-generated list.
+	* sysdeps/unix/sysv/linux/tee.c: New file.
+
 	* nptl/Makefile (CFLAGS-nanosleep.c): New rule.
 	* posix/Makefile (CFLAGS-nanosleep.c): Likewise.
 	* sysdeps/unix/sysv/linux/nanosleep.c: New file.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index ad477f5..9388623 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -17,9 +17,10 @@ include $(firstword $(wildcard $(sysdirs:=/sysctl.mk)))
 sysdep_routines += clone umount umount2 readahead \
 		   setfsuid setfsgid epoll_pwait signalfd \
 		   eventfd eventfd_read eventfd_write prlimit \
-		   personality epoll_wait
+		   personality epoll_wait tee
 
 CFLAGS-gethostid.c = -fexceptions
+CFLAGS-tee.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=(0x80000000-sysconf(_SC_PAGESIZE))"
 
 # Note that bits/mman-linux.h is listed here though the file lives in the
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 7fca6f8..ae99acd 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -70,7 +70,6 @@ stime		-	stime		i:p	stime
 sysinfo		EXTRA	sysinfo		i:p	__sysinfo	sysinfo
 swapon		-	swapon		i:si	__swapon	swapon
 swapoff		-	swapoff		i:s	__swapoff	swapoff
-tee		EXTRA	tee		Ci:iiii	tee
 unshare		EXTRA	unshare		i:i	unshare
 uselib		EXTRA	uselib		i:s	__compat_uselib	uselib@GLIBC_2.0:GLIBC_2.23
 utime		-	utime		i:sP	utime
diff --git a/sysdeps/unix/sysv/linux/tee.c b/sysdeps/unix/sysv/linux/tee.c
new file mode 100644
index 0000000..3d503fb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/tee.c
@@ -0,0 +1,26 @@
+/* Linux duplicating pipe content implementation.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <fcntl.h>
+#include <sysdep-cancel.h>
+
+ssize_t
+tee (int src, int dest, size_t len, unsigned int flags)
+{
+  return SYSCALL_CANCEL (tee, src, dest, len, flags);
+}

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3d0ad5a8dfb7b8dd862108970a62c2c3ce9ddd72

commit 3d0ad5a8dfb7b8dd862108970a62c2c3ce9ddd72
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Nov 3 16:03:56 2015 -0200

    posix: Consolidate Linux nanosleep syscall
    
    This patch consolidates the nanosleep Linux syscall generation on
    sysdeps/unix/sysv/linux/nanosleep.c.  It basically removes it from
    architectures auto-generation list.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* nptl/Makefile (CFLAGS-nanosleep.c): New rule.
    	* posix/Makefile (CFLAGS-nanosleep.c): Likewise.
    	* sysdeps/unix/sysv/linux/nanosleep.c: New file.
    	* sysdeps/unix/sysv/linux/syscalls.list: Remove nanosleep from
    	auto-generated list.

diff --git a/ChangeLog b/ChangeLog
index 98dad73..7bc0ce4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* nptl/Makefile (CFLAGS-nanosleep.c): New rule.
+	* posix/Makefile (CFLAGS-nanosleep.c): Likewise.
+	* sysdeps/unix/sysv/linux/nanosleep.c: New file.
+	* sysdeps/unix/sysv/linux/syscalls.list: Remove nanosleep from
+	auto-generated list.
+
 	* sysdeps/unix/sysv/linux/sh/syscalls.list: Remove waitid from
 	auto-generated list.
 	* sysdeps/unix/sysv/linux/m68k/syscalls.list: Likewise.
diff --git a/nptl/Makefile b/nptl/Makefile
index d39bb50..cdf69bd 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -216,6 +216,7 @@ CFLAGS-sendmsg.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-close.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-read.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-write.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables
 
 CFLAGS-pt-system.c = -fexceptions
 
diff --git a/posix/Makefile b/posix/Makefile
index a78ca3d..52b022c 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -231,6 +231,7 @@ CFLAGS-execle.os = -fomit-frame-pointer
 CFLAGS-execl.os = -fomit-frame-pointer
 CFLAGS-execvp.os = -fomit-frame-pointer
 CFLAGS-execlp.os = -fomit-frame-pointer
+CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables
 
 tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
 		--none random --col --color --colour
diff --git a/sysdeps/unix/sysv/linux/nanosleep.c b/sysdeps/unix/sysv/linux/nanosleep.c
new file mode 100644
index 0000000..b352f84
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/nanosleep.c
@@ -0,0 +1,30 @@
+/* Linux high resolution nanosleep implementation.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <time.h>
+#include <sysdep-cancel.h>
+
+/* Pause execution for a number of nanoseconds.  */
+int
+__nanosleep (const struct timespec *requested_time,
+	     struct timespec *remaining)
+{
+  return SYSCALL_CANCEL (nanosleep, requested_time, remaining);
+}
+libc_hidden_def (__nanosleep)
+weak_alias (__nanosleep, nanosleep)
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index eab30dd..7fca6f8 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -42,7 +42,6 @@ mount		EXTRA	mount		i:sssip	__mount	mount
 mremap		EXTRA	mremap		b:ainip	__mremap	mremap
 munlock		-	munlock		i:ai	munlock
 munlockall	-	munlockall	i:	munlockall
-nanosleep	-	nanosleep	Ci:pp	__nanosleep	nanosleep
 nfsservctl	EXTRA	nfsservctl	i:ipp	nfsservctl
 pipe		-	pipe		i:f	__pipe		pipe
 pipe2		-	pipe2		i:fi	__pipe2		pipe2

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ebfdb12bf0b6a8eccbee28335d0e6297d8b874d1

commit ebfdb12bf0b6a8eccbee28335d0e6297d8b874d1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jan 17 15:57:33 2017 -0200

    posix: Consolidate Linux waitpid syscall
    
    This patch consolidates the waitpid Linux syscall generation on
    sysdeps/unix/sysv/linux/waitpid.c.  It basically removes it from
    architecture auto-generation list and also remove arch specific
    implementations.
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu.
    
    	* sysdeps/unix/sysv/linux/sh/syscalls.list: Remove waitpid from
    	auto-generated list.
    	* sysdeps/unix/sysv/linux/m68k/syscalls.list: Likewise.
    	* sysdeps/unix/sysv/linux/i386/syscalls.list: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/syscalls.list: Remove file.
    	* sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Likewise.

diff --git a/ChangeLog b/ChangeLog
index 135b5a5..98dad73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* sysdeps/unix/sysv/linux/sh/syscalls.list: Remove waitid from
+	auto-generated list.
+	* sysdeps/unix/sysv/linux/m68k/syscalls.list: Likewise.
+	* sysdeps/unix/sysv/linux/i386/syscalls.list: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/syscalls.list: Remove file.
+	* sysdeps/unix/sysv/linux/tile/waitpid.S: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/syscalls.list: Likewise.
+
 	* sysdeps/unix/sysv/linux/generic/pause.c: Remove file.
 	* sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Likewise.
 	* sysdeps/unix/sysv/linux/sparc/kernel-features.h [__arch64__]
diff --git a/sysdeps/unix/sysv/linux/i386/syscalls.list b/sysdeps/unix/sysv/linux/i386/syscalls.list
index 145393f..58020df 100644
--- a/sysdeps/unix/sysv/linux/i386/syscalls.list
+++ b/sysdeps/unix/sysv/linux/i386/syscalls.list
@@ -18,7 +18,6 @@ setfsuid	-	setfsuid32	Ei:i	setfsuid
 modify_ldt	EXTRA	modify_ldt	i:ipi	__modify_ldt	modify_ldt
 vm86old		EXTRA	vm86old		i:p	__vm86old	vm86@GLIBC_2.0
 vm86		-	vm86		i:ip	__vm86		vm86@@GLIBC_2.3.4
-waitpid		-	waitpid		Ci:ipi	__waitpid	waitpid
 
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
 
diff --git a/sysdeps/unix/sysv/linux/m68k/syscalls.list b/sysdeps/unix/sysv/linux/m68k/syscalls.list
index 4260f3e..55a377b 100644
--- a/sysdeps/unix/sysv/linux/m68k/syscalls.list
+++ b/sysdeps/unix/sysv/linux/m68k/syscalls.list
@@ -3,7 +3,6 @@
 chown		-	chown32		i:sii	__chown		chown
 lchown		-	lchown32	i:sii	__lchown	lchown
 fchown		-	fchown32	i:iii	__fchown	fchown
-waitpid		-	waitpid		Ci:ipi	__waitpid	waitpid
 
 getegid		-	getegid32	Ei:	__getegid	getegid
 geteuid		-	geteuid32	Ei:	__geteuid	geteuid
diff --git a/sysdeps/unix/sysv/linux/powerpc/syscalls.list b/sysdeps/unix/sysv/linux/powerpc/syscalls.list
deleted file mode 100644
index 4f821e9..0000000
--- a/sysdeps/unix/sysv/linux/powerpc/syscalls.list
+++ /dev/null
@@ -1,3 +0,0 @@
-# File name	Caller	Syscall name	# args	Strong name	Weak names
-
-waitpid		-	waitpid		Ci:ipi	__waitpid	waitpid
diff --git a/sysdeps/unix/sysv/linux/sh/syscalls.list b/sysdeps/unix/sysv/linux/sh/syscalls.list
index 169d40f..32badd1 100644
--- a/sysdeps/unix/sysv/linux/sh/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sh/syscalls.list
@@ -15,8 +15,6 @@ getgroups	-	getgroups32	i:ip	__getgroups	getgroups
 setfsgid	-	setfsgid32	Ei:i	setfsgid
 setfsuid	-	setfsuid32	Ei:i	setfsuid
 
-waitpid		-	waitpid		Ci:ipi	__waitpid	waitpid
-
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
 
 fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	__fanotify_mark	fanotify_mark@@GLIBC_2.16
diff --git a/sysdeps/unix/sysv/linux/sparc/syscalls.list b/sysdeps/unix/sysv/linux/sparc/syscalls.list
deleted file mode 100644
index 4f821e9..0000000
--- a/sysdeps/unix/sysv/linux/sparc/syscalls.list
+++ /dev/null
@@ -1,3 +0,0 @@
-# File name	Caller	Syscall name	# args	Strong name	Weak names
-
-waitpid		-	waitpid		Ci:ipi	__waitpid	waitpid
diff --git a/sysdeps/unix/sysv/linux/tile/waitpid.S b/sysdeps/unix/sysv/linux/tile/waitpid.S
deleted file mode 100644
index dee1b0c..0000000
--- a/sysdeps/unix/sysv/linux/tile/waitpid.S
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-extern pid_t __waitpid_nocancel (pid_t, int *, int) attribute_hidden;
-*/
-#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt)
-
-/* Call __NR_wait4, providing fourth argument (struct rusage *) as NULL. */
-#define PSEUDO_EXTRA move r3, zero;
-#include <sysdep-cancel.h>
-
-PSEUDO (__waitpid, wait4, 3)
-ret
-PSEUDO_END(__waitpid)
-
-libc_hidden_def (__waitpid)
-weak_alias (__waitpid, waitpid)
-libc_hidden_weak (waitpid)
-
-#endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=88499a87cef0a70f381524b9c4951b53bc5184e3

commit 88499a87cef0a70f381524b9c4951b53bc5184e3
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Nov 21 17:26:35 2016 -0200

    posix: Consolidate Linux pause syscall
    
    This patch consolidates the pause Linux implementation on
    sysdeps/unix/sysv/linux/pause.c.  If defined the pause syscall
    (__NR_pause) will be used, other ppoll with 0 arguments will be
    used instead.
    
    It has the small advantage of generic pause implementation with
    uses rt_sigprocmask plus rt_sigsuspend because it requires only
    one syscall and the pause is done atomically regarding signal
    handling (for instance, pause may not be interrupted if the
    signal arrives between the rt_sigprocmask and rt_sigsuspend
    syscall).
    
    Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32,
    arch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu,
    sparc64-linux-gnu, and sparcv9-linux-gnu.
    
    	* sysdeps/unix/sysv/linux/generic/pause.c: Remove file.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/kernel-features.h [__arch64__]
    	(__NR_pause): Undefine.
    	* sysdeps/unix/sysv/linux/pause.c: New file.
    	* sysdeps/unix/sysv/linux/syscalls.list: Remove pause from
    	auto-generation list.

diff --git a/ChangeLog b/ChangeLog
index 5ebd3a0..135b5a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2017-05-18  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* sysdeps/unix/sysv/linux/generic/pause.c: Remove file.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/kernel-features.h [__arch64__]
+	(__NR_pause): Undefine.
+	* sysdeps/unix/sysv/linux/pause.c: New file.
+	* sysdeps/unix/sysv/linux/syscalls.list: Remove pause from
+	auto-generation list.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/Makefile (CFLAGS-pause.c):
+	Remove rule.
+	* posix/Makefile (CFLAGS-pause.c): Remove redundant rule.
+
 2017-05-18  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* sysdeps/x86_64/multiarch/memcmp.S (__GI_memcmp): Correct
diff --git a/posix/Makefile b/posix/Makefile
index 0025d8a..a78ca3d 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -221,7 +221,6 @@ CFLAGS-spawnp.c = -fexceptions
 CFLAGS-spawnp.os = -fomit-frame-pointer
 CFLAGS-spawni.c = -fexceptions
 CFLAGS-spawni.os = -fomit-frame-pointer
-CFLAGS-pause.c = -fexceptions
 CFLAGS-glob.c = $(uses-callbacks) -fexceptions
 CFLAGS-glob64.c = $(uses-callbacks) -fexceptions
 CFLAGS-getconf.c = -DGETCONF_DIR='"$(libexecdir)/getconf"'
diff --git a/sysdeps/unix/sysv/linux/generic/pause.c b/sysdeps/unix/sysv/linux/pause.c
similarity index 75%
rename from sysdeps/unix/sysv/linux/generic/pause.c
rename to sysdeps/unix/sysv/linux/pause.c
index a8b3e33..4ccce9e 100644
--- a/sysdeps/unix/sysv/linux/generic/pause.c
+++ b/sysdeps/unix/sysv/linux/pause.c
@@ -1,6 +1,6 @@
-/* Copyright (C) 2011-2017 Free Software Foundation, Inc.
+/* Linux pause syscall implementation.
+   Copyright (C) 2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -26,14 +26,10 @@
 int
 __libc_pause (void)
 {
-  sigset_t set;
-
-  int rc =
-    SYSCALL_CANCEL (rt_sigprocmask, SIG_BLOCK, NULL, &set, _NSIG / 8);
-  if (rc == 0)
-    rc = SYSCALL_CANCEL (rt_sigsuspend, &set, _NSIG / 8);
-
-  return rc;
+#ifdef __NR_pause
+  return SYSCALL_CANCEL (pause);
+#else
+  return SYSCALL_CANCEL (ppoll, NULL, 0, NULL, NULL);
+#endif
 }
-
 weak_alias (__libc_pause, pause)
diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
index 72065a0..3fafab3 100644
--- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h
@@ -32,6 +32,10 @@
 # undef __ASSUME_ACCEPT_SYSCALL
 # undef __ASSUME_CONNECT_SYSCALL
 # undef __ASSUME_RECVFROM_SYSCALL
+#else
+/* sparc64 defines __NR_pause,  however it is not supported (ENOSYS).
+   Undefine so pause.c can use a correct alternative.  */
+# undef __NR_pause
 #endif
 
 /* sparc only supports ipc syscall.  */
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile b/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
index 7ea433f..3a7f4aa 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
@@ -9,6 +9,5 @@ sysdep_routines += __start_context
 endif
 
 ifeq ($(subdir),nptl)
-CFLAGS-pause.c += -fexceptions
 CFLAGS-sigsuspend.c += -fexceptions
 endif
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c b/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
deleted file mode 100644
index e399e7c..0000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <errno.h>
-#include <signal.h>
-#include <unistd.h>
-#include <sysdep-cancel.h>
-
-#define __sigprocmask(how, set, oset) \
-  INLINE_SYSCALL (rt_sigprocmask, 4, how, set, oset, _NSIG / 8)
-
-#include <sysdeps/posix/pause.c>
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index f4abf3e..eab30dd 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -44,7 +44,6 @@ munlock		-	munlock		i:ai	munlock
 munlockall	-	munlockall	i:	munlockall
 nanosleep	-	nanosleep	Ci:pp	__nanosleep	nanosleep
 nfsservctl	EXTRA	nfsservctl	i:ipp	nfsservctl
-pause		-	pause		Ci:	__libc_pause	pause
 pipe		-	pipe		i:f	__pipe		pipe
 pipe2		-	pipe2		i:fi	__pipe2		pipe2
 pivot_root	EXTRA	pivot_root	i:ss	pivot_root

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                       |   89 +++++++++++++++++++++++
 misc/Makefile                                   |    6 ++
 nptl/Makefile                                   |    5 ++
 posix/Makefile                                  |    2 +-
 rt/Makefile                                     |    2 +
 sysdeps/unix/syscalls.list                      |    2 -
 sysdeps/unix/sysv/linux/Makefile                |    4 +-
 sysdeps/unix/sysv/linux/alpha/sigsuspend.S      |   32 --------
 sysdeps/unix/sysv/linux/arm/localplt.data       |    1 -
 sysdeps/unix/sysv/linux/fdatasync.c             |   29 ++++++++
 sysdeps/unix/sysv/linux/fsync.c                 |   28 +++++++
 sysdeps/unix/sysv/linux/generic/pause.c         |   39 ----------
 sysdeps/unix/sysv/linux/i386/syscalls.list      |    1 -
 sysdeps/unix/sysv/linux/m68k/syscalls.list      |    1 -
 sysdeps/unix/sysv/linux/mq_timedreceive.c       |   34 +++++++++
 sysdeps/unix/sysv/linux/mq_timedsend.c          |   33 +++++++++
 sysdeps/unix/sysv/linux/msync.c                 |   26 +++++++
 sysdeps/unix/sysv/linux/nanosleep.c             |   30 ++++++++
 sysdeps/unix/sysv/linux/open_by_handle_at.c     |   37 ++++++++++
 sysdeps/unix/sysv/linux/pause.c                 |   35 +++++++++
 sysdeps/unix/sysv/linux/powerpc/syscalls.list   |    3 -
 sysdeps/unix/sysv/linux/sh/syscalls.list        |    2 -
 sysdeps/unix/sysv/linux/sigsuspend.c            |    4 -
 sysdeps/unix/sysv/linux/sparc/kernel-features.h |    4 +
 sysdeps/unix/sysv/linux/sparc/sparc64/Makefile  |    5 --
 sysdeps/unix/sysv/linux/sparc/sparc64/pause.c   |    9 ---
 sysdeps/unix/sysv/linux/sparc/syscalls.list     |    3 -
 sysdeps/unix/sysv/linux/splice.c                |   27 +++++++
 sysdeps/unix/sysv/linux/syscalls.list           |    9 ---
 sysdeps/unix/sysv/linux/tee.c                   |   26 +++++++
 sysdeps/unix/sysv/linux/tile/waitpid.S          |   18 -----
 sysdeps/unix/sysv/linux/vmsplice.c              |   27 +++++++
 32 files changed, 442 insertions(+), 131 deletions(-)
 delete mode 100644 sysdeps/unix/sysv/linux/alpha/sigsuspend.S
 create mode 100644 sysdeps/unix/sysv/linux/fdatasync.c
 create mode 100644 sysdeps/unix/sysv/linux/fsync.c
 delete mode 100644 sysdeps/unix/sysv/linux/generic/pause.c
 create mode 100644 sysdeps/unix/sysv/linux/mq_timedreceive.c
 create mode 100644 sysdeps/unix/sysv/linux/mq_timedsend.c
 create mode 100644 sysdeps/unix/sysv/linux/msync.c
 create mode 100644 sysdeps/unix/sysv/linux/nanosleep.c
 create mode 100644 sysdeps/unix/sysv/linux/open_by_handle_at.c
 create mode 100644 sysdeps/unix/sysv/linux/pause.c
 delete mode 100644 sysdeps/unix/sysv/linux/powerpc/syscalls.list
 delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
 delete mode 100644 sysdeps/unix/sysv/linux/sparc/syscalls.list
 create mode 100644 sysdeps/unix/sysv/linux/splice.c
 create mode 100644 sysdeps/unix/sysv/linux/tee.c
 delete mode 100644 sysdeps/unix/sysv/linux/tile/waitpid.S
 create mode 100644 sysdeps/unix/sysv/linux/vmsplice.c


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]