> From: Aleksandar Rikalo <arik...@wavecomp.com>
> 
> Add support for semtimedop() emulation. It is based on invocation
> of safe_semtimedop().

Hi, Laurent,

Aleksandar R. is considering submitting this part too:

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index b5bc6e4..0e56b8d 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4194,6 +4194,17 @@ static abi_long do_ipc(CPUArchState *cpu_env,
     case IPCOP_shmctl:
         ret = do_shmctl(first, second, ptr);
         break;
+#ifdef __NR_ipc
+    case IPCOP_semtimedop: {
+        struct sembuf sops[nsops];
+        if (target_to_host_sembuf(first, ptr, second)) {
+            ret = -TARGET_EFAULT;
+        } else {
+            ret = get_errno(safe_ipc(IPCOP_semtimedop, first, second, 0, sops, 
0));
+        }
+        break;
+    }
+#endif
     default:
        gemu_log("Unsupported ipc call: %d (version %d)\n", call, version);
        ret = -TARGET_ENOSYS;

Does this look fine to you?

Sincerely,
Aleksandar



Reply via email to