+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
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"'
+++ /dev/null
-/* Copyright (C) 2011-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
- 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 <signal.h>
-#include <unistd.h>
-#include <sysdep-cancel.h>
-
-/* Suspend the process until a signal arrives.
- This always returns -1 and sets errno to EINTR. */
-
-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;
-}
-
-weak_alias (__libc_pause, pause)
--- /dev/null
+/* Linux pause syscall 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 <signal.h>
+#include <unistd.h>
+#include <sysdep-cancel.h>
+
+/* Suspend the process until a signal arrives.
+ This always returns -1 and sets errno to EINTR. */
+
+int
+__libc_pause (void)
+{
+#ifdef __NR_pause
+ return SYSCALL_CANCEL (pause);
+#else
+ return SYSCALL_CANCEL (ppoll, NULL, 0, NULL, NULL);
+#endif
+}
+weak_alias (__libc_pause, pause)
# 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. */
endif
ifeq ($(subdir),nptl)
-CFLAGS-pause.c += -fexceptions
CFLAGS-sigsuspend.c += -fexceptions
endif
+++ /dev/null
-#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>
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