From owner-freebsd-emulation@freebsd.org Tue Sep 22 00:33:48 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 B6F61A05541 for ; Tue, 22 Sep 2015 00:33:48 +0000 (UTC) (envelope-from lobo@bsd.com.br) 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 8E9DD1D06 for ; Tue, 22 Sep 2015 00:33:48 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: by mailman.ysv.freebsd.org (Postfix) id 8BA02A05540; Tue, 22 Sep 2015 00:33:48 +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 71512A0553F for ; Tue, 22 Sep 2015 00:33:48 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-qg0-x236.google.com (mail-qg0-x236.google.com [IPv6:2607:f8b0:400d:c04::236]) (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 2F7A31D05 for ; Tue, 22 Sep 2015 00:33:47 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: by qgez77 with SMTP id z77so105135131qge.1 for ; Mon, 21 Sep 2015 17:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-type:content-transfer-encoding; bh=/k2b1vnX2lILcuu1VJIu1Njwju42QbnhSUJJNJCfIa4=; b=DPzj/QX2o74FWZTwi4xqnXpEldZgognALyGKSZzmU62xMsW1TqxeJYaVJ/baA0XUy9 QbDDE3bG61tUKz4uS7Ixcx3/TL3b+stO8bWwAtqAZLS58aAu1KIv8qTXdYwLMxUwSSis PU8BCDB4BFIOe78r84tk7nJNZEJ7/4rlfvbac= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-type :content-transfer-encoding; bh=/k2b1vnX2lILcuu1VJIu1Njwju42QbnhSUJJNJCfIa4=; b=A0mpNO1XtMc6z1yPNcKEF1MIEEyamE+uNbIpDQCO4zR7W1WJ4oAd1t1xQjYfsZoAwv NaqrinCNpz9E12lbfQKqRFkWpWg4kBR7tL8EpcspD07Ek/tpP9t6TJUD0yGyH3s433O/ BEnu0I1dhmxFUSlv8smtoXftPfPMrwIYS9TO0eKppg7J/noAMBgvriWDsjcFlZCtihLZ V6rYniyWkQ1vr8BSXZd73kwjVK5uf8LloEQN1qyHUgdoN1nj7N05sWQtlhtuVMRWRl3E ptCwL40kVXprzUOgg9Lu8vmnATtBP5oJCADJDKB8UGSVQ4u4xL1Z1onnEZbg08dE1PTd jjUA== X-Gm-Message-State: ALoCoQlT9h+fnrvoNh6cl6CT2DKh58auEQb5N2xGLvpH1QkYi8uKCAFuo1KJ7rMcAIFfMCYhKpLA X-Received: by 10.140.91.112 with SMTP id y103mr26627522qgd.68.1442882026582; Mon, 21 Sep 2015 17:33:46 -0700 (PDT) Received: from Papi (177.206.249.91.dynamic.adsl.gvt.net.br. [177.206.249.91]) by smtp.gmail.com with ESMTPSA id 82sm10920692qhs.8.2015.09.21.17.33.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Sep 2015 17:33:46 -0700 (PDT) Date: Mon, 21 Sep 2015 21:38:29 -0300 From: Mario Lobo To: Mateusz Guzik Cc: Gary Jennejohn , emulation@FreeBSD.org Subject: Re: Linux epoll implementation Message-ID: <20150921213829.39b3a61d@Papi> In-Reply-To: <20150920154937.GA27493@dft-labs.eu> References: <20150919130625.4d3897f8@Papi> <20150920130326.4014e853@ernst.home> <20150920124035.6e1c5539@Papi> <20150920154937.GA27493@dft-labs.eu> Organization: BSD X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd10.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Tue, 22 Sep 2015 00:33:48 -0000 On Sun, 20 Sep 2015 17:49:38 +0200 Mateusz Guzik 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."