Re: [PATCH v2] epoll: add nsec timeout support

From: Matthew Wilcox
Date: Mon Nov 16 2020 - 15:00:27 EST


On Mon, Nov 16, 2020 at 02:54:17PM -0500, Willem de Bruijn wrote:
> > You could also add a compile assert to check that the flag is reserved.
>
> Like this?
>
> /* Check the EPOLL_* constant for consistency. */
> BUILD_BUG_ON(EPOLL_CLOEXEC != O_CLOEXEC);
> + BUILD_BUG_ON(EPOLL_NSTIMEO & EPOLL_RESERVED_FLAGS);

i think you got the sense of that test wrong. but yes.