qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 16/21] linux-user: implement pipe2 [v3]


From: Stuart Brady
Subject: Re: [Qemu-devel] [PATCH 16/21] linux-user: implement pipe2 [v3]
Date: Tue, 16 Jun 2009 22:44:29 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Fri, Jun 12, 2009 at 04:50:26PM +0300, address@hidden wrote:
> +static abi_long do_pipe2(int host_pipe[], int flags)
> +{
> +#ifdef CONFIG_PIPE2
> +    return pipe2(host_pipe, flags);
> +#else
> +    return -ENOSYS;
> +#endif
> +}
> +
> +static abi_long do_pipe(void *cpu_env, int pipedes, int flags)
> +{
> +    int host_pipe[2];
> +    abi_long ret;
> +    ret = flags ? do_pipe2(host_pipe, flags) : pipe(host_pipe);

This worries me slightly -- surely syscalls should be consistently
supported / not supported (where feasible), regardless of the precise
arguments that are supplied?  (Otherwise, any run-time check for pipe2
would get tricked if that check specifies 0 for flags.)

OTOH, I'm not sure what behaviour the library would provide for the
pipe2() function, if the pipe2 syscall is not available.  One could
that the pipe2() function is another matter entirely, and that QEMU
shouldn't be too concerned with its implementation, though.

Cheers,
-- 
Stuart Brady




reply via email to

[Prev in Thread] Current Thread [Next in Thread]