Linux epoll implementation

Mario Lobo lobo at bsd.com.br
Tue Sep 22 00:33:48 UTC 2015


On Sun, 20 Sep 2015 17:49:38 +0200
Mateusz Guzik <mjguzik at gmail.com> wrote:

> 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.
> 

You were right, Mateusz. It didn't damage anything but the resulting
linux.ko didn't even load because of erros.

I'll install an 11-CURRENT VM to do the testing you suggested.

Thanks !

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since 2.2.8 [not Pro-Audio.... YET!!]
 
"UNIX was not designed to stop you from doing stupid things, 
because that would also stop you from doing clever things."


More information about the freebsd-emulation mailing list