Commit f0cbb613331165d5b24760a0203d079be5dfce54
1 parent
4cb05961
Implement waitid syscall.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4626 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
15 additions
and
0 deletions
linux-user/syscall.c
... | ... | @@ -3169,6 +3169,21 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, |
3169 | 3169 | } |
3170 | 3170 | break; |
3171 | 3171 | #endif |
3172 | +#ifdef TARGET_NR_waitid | |
3173 | + case TARGET_NR_waitid: | |
3174 | + { | |
3175 | + siginfo_t info; | |
3176 | + info.si_pid = 0; | |
3177 | + ret = get_errno(waitid(arg1, arg2, &info, arg4)); | |
3178 | + if (!is_error(ret) && arg3 && info.si_pid != 0) { | |
3179 | + if (!(p = lock_user(VERIFY_WRITE, arg3, sizeof(target_siginfo_t), 0))) | |
3180 | + goto efault; | |
3181 | + host_to_target_siginfo(p, &info); | |
3182 | + unlock_user(p, arg3, sizeof(target_siginfo_t)); | |
3183 | + } | |
3184 | + } | |
3185 | + break; | |
3186 | +#endif | |
3172 | 3187 | #ifdef TARGET_NR_creat /* not on alpha */ |
3173 | 3188 | case TARGET_NR_creat: |
3174 | 3189 | if (!(p = lock_user_string(arg1))) | ... | ... |