diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-30 18:20:05 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-30 18:20:05 +0000 |
commit | f0cbb613331165d5b24760a0203d079be5dfce54 (patch) | |
tree | 6d1f39bb7386d67aa36f6678cc36e2d8c314dfea | |
parent | 4cb05961c2d637d2cad237755e544d725a941b9a (diff) |
Implement waitid syscall.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4626 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | linux-user/syscall.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7548ea7959..618e57ef23 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3169,6 +3169,21 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } break; #endif +#ifdef TARGET_NR_waitid + case TARGET_NR_waitid: + { + siginfo_t info; + info.si_pid = 0; + ret = get_errno(waitid(arg1, arg2, &info, arg4)); + if (!is_error(ret) && arg3 && info.si_pid != 0) { + if (!(p = lock_user(VERIFY_WRITE, arg3, sizeof(target_siginfo_t), 0))) + goto efault; + host_to_target_siginfo(p, &info); + unlock_user(p, arg3, sizeof(target_siginfo_t)); + } + } + break; +#endif #ifdef TARGET_NR_creat /* not on alpha */ case TARGET_NR_creat: if (!(p = lock_user_string(arg1))) |