[Top][All Lists]
[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
- [Qemu-devel] [PATCH 19/21] linux-user: initialize mmap_mutex properly, (continued)
- [Qemu-devel] [PATCH 19/21] linux-user: initialize mmap_mutex properly, riku . voipio, 2009/06/12
- [Qemu-devel] [PATCH 13/21] linux-user: support private futexes, riku . voipio, 2009/06/12
- [Qemu-devel] [PATCH 14/21] add futex wake op, riku . voipio, 2009/06/12
- [Qemu-devel] [PATCH 07/21] linux-user: fix utimensat, riku . voipio, 2009/06/12
- [Qemu-devel] [PATCH 15/21] linux-user: update syscall list, riku . voipio, 2009/06/12
- [Qemu-devel] [PATCH 02/21] Implement shm* syscalls and fix 64/32bit errors, riku . voipio, 2009/06/12
- [Qemu-devel] [PATCH 10/21] linux-user: Added IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP flags to setsockopt, riku . voipio, 2009/06/12
- [Qemu-devel] [PATCH 12/21] linux-user: include linux/fs.h, riku . voipio, 2009/06/12
- [Qemu-devel] [PATCH 20/21] linux-user/syscall.c: define _ATFILE_SOURCE, riku . voipio, 2009/06/12
- [Qemu-devel] [PATCH 16/21] linux-user: implement pipe2 [v3], riku . voipio, 2009/06/12
- Re: [Qemu-devel] [PATCH 16/21] linux-user: implement pipe2 [v3],
Stuart Brady <=
- [Qemu-devel] [PATCH 17/21] linux-user: add tee, splice and vmsplice, riku . voipio, 2009/06/12
- [Qemu-devel] [PATCH 08/21] Fix struct termios host - target translation, riku . voipio, 2009/06/12
[Qemu-devel] [PATCH 06/21] Revived GUEST_BASE support for usermode emulation targets [v5], riku . voipio, 2009/06/12