Le 31/07/2019 à 20:22, Aleksandar Markovic a écrit :
>> From: Aleksandar Rikalo <[email protected]>
>>
>> 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
You should do something like that:
case IPCOP_semtimedop
ret = do_semtimedop( ... );
break;
Thanks,
Laurent