[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 57/74] linux-user: Split out sgetmask, ssetmask
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v7 57/74] linux-user: Split out sgetmask, ssetmask |
Date: |
Sun, 19 May 2019 13:37:09 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
linux-user/syscall-defs.h | 6 ++++++
linux-user/syscall-sig.inc.c | 32 ++++++++++++++++++++++++++++++++
linux-user/syscall.c | 27 ---------------------------
linux-user/strace.list | 6 ------
4 files changed, 38 insertions(+), 33 deletions(-)
diff --git a/linux-user/syscall-defs.h b/linux-user/syscall-defs.h
index b62bffeb68..99532f75b2 100644
--- a/linux-user/syscall-defs.h
+++ b/linux-user/syscall-defs.h
@@ -222,6 +222,12 @@ SYSCALL_DEF(shmget, ARG_DEC, ARG_DEC, ARG_HEX);
#ifdef TARGET_NR_sigaction
SYSCALL_DEF(sigaction, ARG_SIGNAL, ARG_PTR, ARG_PTR);
#endif
+#ifdef TARGET_NR_sgetmask
+SYSCALL_DEF(sgetmask);
+#endif
+#ifdef TARGET_NR_ssetmask
+SYSCALL_DEF(ssetmask, ARG_HEX);
+#endif
#ifdef TARGET_NR_stime
SYSCALL_DEF(stime, ARG_PTR);
#endif
diff --git a/linux-user/syscall-sig.inc.c b/linux-user/syscall-sig.inc.c
index 918d58878f..f50ed16b74 100644
--- a/linux-user/syscall-sig.inc.c
+++ b/linux-user/syscall-sig.inc.c
@@ -211,3 +211,35 @@ SYSCALL_IMPL(sigaction)
return ret;
}
#endif
+
+#ifdef TARGET_NR_sgetmask
+SYSCALL_IMPL(sgetmask)
+{
+ sigset_t cur_set;
+ abi_ulong target_set;
+ abi_long ret = do_sigprocmask(0, NULL, &cur_set);
+
+ if (!ret) {
+ host_to_target_old_sigset(&target_set, &cur_set);
+ ret = target_set;
+ }
+ return ret;
+}
+#endif
+
+#ifdef TARGET_NR_ssetmask
+SYSCALL_IMPL(ssetmask)
+{
+ sigset_t set, oset;
+ abi_ulong target_set = arg1;
+ abi_long ret;
+
+ target_to_host_old_sigset(&set, &target_set);
+ ret = do_sigprocmask(SIG_SETMASK, &set, &oset);
+ if (!ret) {
+ host_to_target_old_sigset(&target_set, &oset);
+ ret = target_set;
+ }
+ return ret;
+}
+#endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 3ef1bfb4ec..7bd410bcf0 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4241,33 +4241,6 @@ static abi_long do_syscall1(void *cpu_env, int num,
abi_long arg1,
void *p;
switch(num) {
-#ifdef TARGET_NR_sgetmask /* not on alpha */
- case TARGET_NR_sgetmask:
- {
- sigset_t cur_set;
- abi_ulong target_set;
- ret = do_sigprocmask(0, NULL, &cur_set);
- if (!ret) {
- host_to_target_old_sigset(&target_set, &cur_set);
- ret = target_set;
- }
- }
- return ret;
-#endif
-#ifdef TARGET_NR_ssetmask /* not on alpha */
- case TARGET_NR_ssetmask:
- {
- sigset_t set, oset;
- abi_ulong target_set = arg1;
- target_to_host_old_sigset(&set, &target_set);
- ret = do_sigprocmask(SIG_SETMASK, &set, &oset);
- if (!ret) {
- host_to_target_old_sigset(&target_set, &oset);
- ret = target_set;
- }
- }
- return ret;
-#endif
#ifdef TARGET_NR_sigprocmask
case TARGET_NR_sigprocmask:
{
diff --git a/linux-user/strace.list b/linux-user/strace.list
index 20a71adc21..3cad68e081 100644
--- a/linux-user/strace.list
+++ b/linux-user/strace.list
@@ -1116,9 +1116,6 @@
#ifdef TARGET_NR_setxattr
{ TARGET_NR_setxattr, "setxattr" , NULL, NULL, NULL },
#endif
-#ifdef TARGET_NR_sgetmask
-{ TARGET_NR_sgetmask, "sgetmask" , NULL, NULL, NULL },
-#endif
#ifdef TARGET_NR_shutdown
{ TARGET_NR_shutdown, "shutdown" , NULL, NULL, NULL },
#endif
@@ -1158,9 +1155,6 @@
#ifdef TARGET_NR_splice
{ TARGET_NR_splice, "splice" , NULL, NULL, NULL },
#endif
-#ifdef TARGET_NR_ssetmask
-{ TARGET_NR_ssetmask, "ssetmask" , NULL, NULL, NULL },
-#endif
#ifdef TARGET_NR_stat
{ TARGET_NR_stat, "stat" , NULL, print_stat, NULL },
#endif
--
2.17.1
- [Qemu-devel] [PATCH v7 45/74] linux-user: Split out acct, (continued)
- [Qemu-devel] [PATCH v7 45/74] linux-user: Split out acct, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 39/74] linux-user: Split out kill, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 46/74] linux-user: Move syscall_init to the end, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 44/74] linux-user: Split out times, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 43/74] linux-user: Split out pipe, pipe2, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 48/74] linux-user: Fix types in ioctl logging, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 49/74] linux-user: Remove sentinel from ioctl_entries, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 51/74] linux-user: Split out setpgid, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 50/74] linux-user: Split out fcntl, fcntl64, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 53/74] linux-user: Split out chroot, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 57/74] linux-user: Split out sgetmask, ssetmask,
Richard Henderson <=
- [Qemu-devel] [PATCH v7 56/74] linux-user: Split out sigaction, rt_sigaction, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 58/74] linux-user: Split out sigprocmask, rt_sigprocmask, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 60/74] linux-user: Split out sigsuspend, rt_sigsuspend, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 55/74] linux-user: Split out getsid, setsid, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 47/74] linux-user: Split out ioctl, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 54/74] linux-user: Split out getpgid, getpgrp, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 52/74] linux-user: Split out umask, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 59/74] linux-user: Split out sigpending, rt_sigpending, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 64/74] linux-user: Split out gethostname, sethostname, Richard Henderson, 2019/05/19
- [Qemu-devel] [PATCH v7 65/74] linux-user: Split out getrlimit, setrlimit, Richard Henderson, 2019/05/19