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] linux epoll_wait: Include <sysdep-cancel.h>



On 10/11/2017 01:07, Luke Shumaker wrote:
> The epoll_wait wrapper uses the raw syscall if __NR_epoll_wait is defined,
> and falls back to calling epoll_pwait(..., NULL) if it isn't defined.
> However, it didn't include the appropriate headers for __NR_epoll_wait to
> be defined, so it was *always* falling back to calling epoll_pwait!
> 
> This mistake was introduced in b62c3815912bc679a966134affdedd3f35ae8621,
> when epoll_wait changed from being in syscalls.list to always having a C
> wrapper.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

Do you commit access? Otherwise I can commit it for you.

> ---
>  ChangeLog                            | 4 ++++
>  sysdeps/unix/sysv/linux/epoll_wait.c | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/ChangeLog b/ChangeLog
> index 475945bc32..807a826335 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,7 @@
> +2017-11-09  Luke Shumaker  <lukeshu@parabola.nu>
> +
> +	* sysdeps/unix/sysv/linux/epoll_wait.c: Include <sysdep-cancel.h>.
> +
>  2017-11-09  H.J. Lu  <hongjiu.lu@intel.com>
>  
>  	* include/setjmp.h [!_ISOMAC]: Include <stddef.h> and
> diff --git a/sysdeps/unix/sysv/linux/epoll_wait.c b/sysdeps/unix/sysv/linux/epoll_wait.c
> index eb6e6d3ace..b324ff832a 100644
> --- a/sysdeps/unix/sysv/linux/epoll_wait.c
> +++ b/sysdeps/unix/sysv/linux/epoll_wait.c
> @@ -21,6 +21,8 @@
>  #include <sys/types.h>
>  #include <sys/epoll.h>
>  
> +#include <sysdep-cancel.h>
> +
>  int
>  epoll_wait (int epfd, struct epoll_event *events, int maxevents, int timeout)
>  {
> 


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