Linux epoll implementation

Mateusz Guzik mjguzik at gmail.com
Sun Sep 20 15:49:43 UTC 2015


On Sun, Sep 20, 2015 at 12:40:35PM -0300, Mario Lobo wrote:
> > > I'm trying to compile this epoll implementation into the kernel
> > > following
> > > 
> > > https://wiki.freebsd.org/linux-kernel
> > > 
> > > The patch applies fine but when compiling the kernel, it stops at
> > > this:
> > > 
> > > /usr/src/sys/modules/linux/../../compat/linux/linux_epoll.c:66:10:
> > > error: implicit declaration of function 'kqueue' is invalid in C99
> > > [-Werror,-Wimplicit-function-declaration] 
> > > return (kqueue(td, &k_args));
> > > 
> > > 
> > NOTE: I'm referencing HEAD here.
> > 
> > epoll() is a system call (syscall), so it will be using the
> > kernel interfaces.
> > 
> > The only kqueue-related syscall with the same arguments is
> > sys_kqueue().  Try using that instead.
> > 
> 
> Yes! That solved the compilation problem. Tomorrow I'll test to see if
> the implementation works.
> 

epoll is already present in FreeBSD CURRENT (head) and likly with same
or better level of completness. The site in question is very outdated
and you are more than likely to run into trouble with this patch.

In short, I strongly recoomend you use freebsd current instead.

-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the freebsd-emulation mailing list