@@ -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
@@ -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
@@ -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:
{
@@ -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
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- 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(-) -- 2.17.1