lkml.org 
[lkml]   [2020]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] epoll: add nsec timeout support
On Mon, Nov 16, 2020 at 11:10:01AM -0500, Willem de Bruijn wrote:
> diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h
> index 8a3432d0f0dc..f6ef9c9f8ac2 100644
> --- a/include/uapi/linux/eventpoll.h
> +++ b/include/uapi/linux/eventpoll.h
> @@ -21,6 +21,7 @@
>
> /* Flags for epoll_create1. */
> #define EPOLL_CLOEXEC O_CLOEXEC
> +#define EPOLL_NSTIMEO 0x1
>
> /* Valid opcodes to issue to sys_epoll_ctl() */
> #define EPOLL_CTL_ADD 1

Not a problem with your patch, but this concerns me. O_CLOEXEC is
defined differently for each architecture, so we need to stay out of
several different bits when we define new flags for EPOLL_*. Maybe
this:

/*
* Flags for epoll_create1. O_CLOEXEC may be different bits, depending
* on the CPU architecture. Reserve the known ones.
*/
#define EPOLL_CLOEXEC O_CLOEXEC
#define EPOLL_RESERVED_FLAGS 0x00680000
#define EPOLL_NSTIMEO 0x00000001

\
 
 \ /
  Last update: 2020-11-16 17:40    [W:0.081 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site