Implement sem* syscalls
authorKirill A. Shutemov <kirill@shutemov.name>
Sun, 28 Sep 2008 18:29:28 +0000 (21:29 +0300)
committerRiku Voipio <riku.voipio@nokia.com>
Wed, 14 Jan 2009 14:54:41 +0000 (16:54 +0200)
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>

linux-user/syscall.c

index 3361a83..80b12b8 100644 (file)
@@ -4924,7 +4924,21 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
        ret = do_ipc(arg1, arg2, arg3, arg4, arg5, arg6);
        break;
 #endif
-
+#ifdef TARGET_NR_semget
+    case TARGET_NR_semget:
+        ret = get_errno(semget(arg1, arg2, arg3));
+        break;
+#endif
+#ifdef TARGET_NR_semop
+    case TARGET_NR_semop:
+        ret = get_errno(do_semop(arg1, arg2, arg3));
+        break;
+#endif
+#ifdef TARGET_NR_semctl
+    case TARGET_NR_semctl:
+        ret = do_semctl(arg1, arg2, arg3, (union target_semun)(abi_ulong)arg4);
+        break;
+#endif
 #ifdef TARGET_NR_msgctl
     case TARGET_NR_msgctl:
         ret = do_msgctl(arg1, arg2, arg3);