Skip to contentSkip to conversation

[4626] Implement waitid syscall.

Qemu-devel Paul Brook 1 participant 1 message May 30, 2008

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

Revision: 4626

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4626
Author:   pbrook
Date:     2008-05-30 18:20:05 +0000 (Fri, 30 May 2008)

Log Message:
-----------
Implement waitid syscall.

Modified Paths:
--------------
trunk/linux-user/syscall.c

Modified: trunk/linux-user/syscall.c
===================================================================

linux-user/syscall.c +15 -0
@@ -3169,6 +3169,21 @@
         }
         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)))