@@ -16,6 +16,9 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef TARGET_NR_alarm
+SYSCALL_DEF(alarm, ARG_DEC);
+#endif
SYSCALL_DEF_FULL(brk, .impl = impl_brk,
.print_ret = print_syscall_ptr_ret,
.arg_type = { ARG_PTR });
@@ -106,6 +109,9 @@ SYSCALL_DEF(open, ARG_STR, ARG_OPENFLAG, ARG_MODEFLAG);
#endif
SYSCALL_DEF(openat, ARG_ATDIRFD, ARG_STR, ARG_OPENFLAG, ARG_MODEFLAG);
SYSCALL_DEF(open_by_handle_at, ARG_DEC, ARG_PTR, ARG_OPENFLAG);
+#ifdef TARGET_NR_pause
+SYSCALL_DEF(pause);
+#endif
SYSCALL_DEF_FULL(pread64, .impl = impl_pread64,
.args = args_pread64_pwrite64,
.arg_type = { ARG_DEC, ARG_PTR, ARG_DEC, ARG_DEC64 });
new file mode 100644
@@ -0,0 +1,36 @@
+/*
+ * Linux signal related syscalls
+ * Copyright (c) 2003 Fabrice Bellard
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifdef TARGET_NR_alarm
+SYSCALL_IMPL(alarm)
+{
+ return alarm(arg1);
+}
+#endif
+
+#ifdef TARGET_NR_pause
+SYSCALL_IMPL(pause)
+{
+ if (!block_signals()) {
+ CPUState *cpu = ENV_GET_CPU(cpu_env);
+ TaskState *ts = cpu->opaque;
+ sigsuspend(&ts->signal_mask);
+ }
+ return -TARGET_EINTR;
+}
+#endif
@@ -5327,17 +5327,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
void *p;
switch(num) {
-#ifdef TARGET_NR_alarm /* not on alpha */
- case TARGET_NR_alarm:
- return alarm(arg1);
-#endif
-#ifdef TARGET_NR_pause /* not on alpha */
- case TARGET_NR_pause:
- if (!block_signals()) {
- sigsuspend(&((TaskState *)cpu->opaque)->signal_mask);
- }
- return -TARGET_EINTR;
-#endif
#ifdef TARGET_NR_utime
case TARGET_NR_utime:
{
@@ -9135,6 +9124,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
#include "syscall-ipc.inc.c"
#include "syscall-mem.inc.c"
#include "syscall-proc.inc.c"
+#include "syscall-sig.inc.c"
#include "syscall-time.inc.c"
#undef SYSCALL_IMPL
@@ -25,9 +25,6 @@
#ifdef TARGET_NR_afs_syscall
{ TARGET_NR_afs_syscall, "afs_syscall" , NULL, NULL, NULL },
#endif
-#ifdef TARGET_NR_alarm
-{ TARGET_NR_alarm, "alarm" , NULL, NULL, NULL },
-#endif
#ifdef TARGET_NR_aplib
{ TARGET_NR_aplib, "aplib" , NULL, NULL, NULL },
#endif
@@ -872,9 +869,6 @@
#ifdef TARGET_NR_osf_waitid
{ TARGET_NR_osf_waitid, "osf_waitid" , NULL, NULL, NULL },
#endif
-#ifdef TARGET_NR_pause
-{ TARGET_NR_pause, "pause" , NULL, NULL, NULL },
-#endif
#ifdef TARGET_NR_pciconfig_iobase
{ TARGET_NR_pciconfig_iobase, "pciconfig_iobase" , NULL, NULL, NULL },
#endif
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/syscall-defs.h | 6 ++++++ linux-user/syscall-sig.inc.c | 36 ++++++++++++++++++++++++++++++++++++ linux-user/syscall.c | 12 +----------- linux-user/strace.list | 6 ------ 4 files changed, 43 insertions(+), 17 deletions(-) create mode 100644 linux-user/syscall-sig.inc.c -- 2.17.2