This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] posix: Add p{read,write}v2 RWF_NOWAIT flag (BZ#21738)


On 2017.07.10 at 16:47 -0300, Adhemerval Zanella wrote:
> 
> 
> On 10/07/2017 16:36, Zack Weinberg wrote:
> > Argh, one more thing:
> > 
> > On Mon, Jul 10, 2017 at 3:34 PM, Zack Weinberg <zackw@panix.com> wrote:
> >>
> >> Suggest instead "Use nonblocking mode for this operation; that is,
> >> this call to @code{preadv2} will fail and set @code{errno} to
> >> @code{EAGAIN} if the operation would block."
> > 
> > "... this call to @code{preadv2} or @code{pwritev2} ..." It does work
> > in both, right?
> > 
> > zw
> > 
> 
> That's the new version:
> 
> 	* sysdeps/unix/sysv/linux/bits/uio-ext.h (RWF_NOWAIT): New flag.

> diff --git a/sysdeps/unix/sysv/linux/bits/uio-ext.h b/sysdeps/unix/sysv/linux/bits/uio-ext.h
> index 4ddb644..12cd78e 100644
> --- a/sysdeps/unix/sysv/linux/bits/uio-ext.h
> +++ b/sysdeps/unix/sysv/linux/bits/uio-ext.h
> @@ -46,6 +46,10 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
>  #define RWF_HIPRI	0x00000001 /* High priority request.  */
>  #define RWF_DSYNC	0x00000002 /* per-IO O_DSYNC.  */
>  #define RWF_SYNC	0x00000004 /* per-IO O_SYNC.  */
> +#define RWF_NOWAIT	0x00000008 /* per-IO, return -EAGAIN if operation
> +				      would block */
> +#define RWF_SUPPORTED	(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT)

In case you haven't noticed already, this still defines RWF_SUPPORTED in
uio-ext.h.

-- 
Markus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]