From owner-freebsd-emulation@freebsd.org Sun Sep 20 15:49:43 2015 Return-Path: Delivered-To: freebsd-emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A44FA0533B for ; Sun, 20 Sep 2015 15:49:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 2A08010D0 for ; Sun, 20 Sep 2015 15:49:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 269D1A05339; Sun, 20 Sep 2015 15:49:43 +0000 (UTC) Delivered-To: emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26343A05338 for ; Sun, 20 Sep 2015 15:49:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB39510CF for ; Sun, 20 Sep 2015 15:49:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wicgb1 with SMTP id gb1so85550542wic.1 for ; Sun, 20 Sep 2015 08:49:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=k9JUyzE/JwoHRwIxMQwGwcHmhdjj5y0buGsqRk7PHVo=; b=z2EehVSPcD7Kzzj6abXGS66iKEqn7gjz/wxIqQAA4EDeH5a+NjCdsK3i2+FTXaZVz6 3gTMFWcGJXsV7GwefMz212e6Bynd0md//s8IdqBsKXwOB1rAv8pR0DhbyGzw+plzm3PP S3MTWhzdT1GL63HxPyrgjdrnT4Dt23VkrkS/Qj1UcC6Vg69KC/y3di0gtjsIEGwxmGN1 mWboy1M5MWqMACIeNABAV4uQyml5wnGtDFZBWJZ18pH/XS6ArTDnPIGwV/LZC0a9WRuP 55rXqT5sVEvh+h05e1bkbHow7jNnCoKTlqzFKzTDgq1ku3tltF78wXAacwNHqpwBWsy4 1KrQ== X-Received: by 10.194.104.39 with SMTP id gb7mr18130409wjb.150.1442764180831; Sun, 20 Sep 2015 08:49:40 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id uq5sm19587933wjc.3.2015.09.20.08.49.39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 20 Sep 2015 08:49:39 -0700 (PDT) Date: Sun, 20 Sep 2015 17:49:38 +0200 From: Mateusz Guzik To: Mario Lobo Cc: Gary Jennejohn , emulation@FreeBSD.org Subject: Re: Linux epoll implementation Message-ID: <20150920154937.GA27493@dft-labs.eu> References: <20150919130625.4d3897f8@Papi> <20150920130326.4014e853@ernst.home> <20150920124035.6e1c5539@Papi> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150920124035.6e1c5539@Papi> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Sep 2015 15:49:43 -0000 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