epoll_create wrapper function is not used
archsbran at gmail.com
Sun Jul 5 07:27:58 UTC 2020
On Sun, 5 Jul 2020 at 08:47, Bran S <archsbran at gmail.com> wrote:
> On Tue, 30 Jun 2020 at 22:13, Dmitry V. Levin <ldv at altlinux.org> wrote:
> > On Sun, Jun 28, 2020 at 10:24:23PM +0530, Bran S wrote:
> > > In tests/epoll_create.c:
> > > const long int size = (long int) 0xdeadbeefffffffffULL;
> > > long rc = syscall(__NR_epoll_create, size);
> > >
> > > Why syscall(__NR_epoll_create) is used when a wrapper function is
> > > available for it in #include <sys/epoll.h>? Are they different in some
> > > way? What is the reason for not using the wrapper?
> > >
> > > In manpage of epoll_create there is a line:
> > > "Library support is provided in glibc starting with version 2.3.2."
> > > Is this the reason? So that machines with glibc 2.3.2 can also use this?
> > epoll_create is a syscall obsoleted by epoll_create1, so some libc (e.g.
> > musl) implement epoll_create function using epoll_create1 syscall.
> But epoll_create1 is also tested the same way by using
> Why not use the epoll_create1 wrapper?
And this is the same for epoll_ctl.
The wrapper function is not used instead syscall(__NR_epoll_ctl) is being used.
What is the reason for doing this?
> > > Also, why the datatype of size parameter is 'long int'? epoll_create's
> > > prototype has got the size parameter's datatype to be 'int'.
> > This is a way of testing that extra bits are ignored.
More information about the Strace-devel