From owner-freebsd-emulation@freebsd.org Sun Sep 20 15:35:55 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 3098BA05E8D for ; Sun, 20 Sep 2015 15:35:55 +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 09F7C1DA3 for ; Sun, 20 Sep 2015 15:35:55 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: by mailman.ysv.freebsd.org (Postfix) id 069B0A05E8C; Sun, 20 Sep 2015 15:35:55 +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 E0602A05E8B for ; Sun, 20 Sep 2015 15:35:54 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-qg0-x229.google.com (mail-qg0-x229.google.com [IPv6:2607:f8b0:400d:c04::229]) (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 A09621DA2 for ; Sun, 20 Sep 2015 15:35:54 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: by qgt47 with SMTP id 47so72846314qgt.2 for ; Sun, 20 Sep 2015 08:35:53 -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=o0/RZseQKmyTidmaIS3RzoS1EPDbO3xMgT1clYLDg64=; b=S9YXTHSTWkPTN9fAhMC0yKTJIoDJi8UCH90PGzjwlKlkXYlyjC0UzVRvsNML91Whiv GsG4+VQXMa5Z16J9ZZi4T+maWU3/zx/w976UaAUOc0CuTHZncCQKHLytVZJ2LiQuWNUG RUM57YUSLncm/r2J2f7eNjzPOHifIOGnhIai0= 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=o0/RZseQKmyTidmaIS3RzoS1EPDbO3xMgT1clYLDg64=; b=L6k/x6PTH6mw5bj2tONV4LQ0yojSTMIiAdCe0tfUCFxjsaTL61BO0ZCPX1V3Biowdq t+P2Q6H+E141w8sqyt/sVaPWND1e34Rb1B9+K5XiGYzfE2D9e00Pbl9OVv3WDGOp0KhE 58y/MmFwnhK+e80mTXMta4oQoO/7Yck+VcVvz5hMlsfn9+AI2sIm84dd+rTo+063Fqh0 faV0kKzzDfovQoVuzJot3HUYTZU+RFlclY5nGs6bhj+4SeYDuVqhNcUDVS1x8Swmv2py ID20P/NCzRWwxnaVBoPMz6NUbXJdq5jTkI7JVmEoM/NNMJP74Itg+rfkPT0XSfm0hSU5 KHNQ== X-Gm-Message-State: ALoCoQl4DTZG/hpmAVriIPxzMvDVgayhXxjqkFWTERu7pcMUwEIepFXOvUeylvco0fkcp4bqawi8 X-Received: by 10.140.132.71 with SMTP id 68mr18751370qhe.64.1442763353370; Sun, 20 Sep 2015 08:35:53 -0700 (PDT) Received: from Papi ([179.181.60.220]) by smtp.gmail.com with ESMTPSA id m12sm8077230qkh.34.2015.09.20.08.35.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Sep 2015 08:35:53 -0700 (PDT) Date: Sun, 20 Sep 2015 12:40:35 -0300 From: Mario Lobo To: Gary Jennejohn Cc: emulation@FreeBSD.org Subject: Re: Linux epoll implementation Message-ID: <20150920124035.6e1c5539@Papi> In-Reply-To: <20150920130326.4014e853@ernst.home> References: <20150919130625.4d3897f8@Papi> <20150920130326.4014e853@ernst.home> 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: Sun, 20 Sep 2015 15:35:55 -0000 On Sun, 20 Sep 2015 13:03:26 +0200 Gary Jennejohn wrote: > On Sat, 19 Sep 2015 13:06:25 -0300 > Mario Lobo wrote: > > > Hi; > > > > I'm trying to compile this epoll implementation into the kernel > > following > > > > https://wiki.freebsd.org/linux-kernel > > > > using the patch provided. > > > > 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)); > > > > > > That is the only reference to kqueue on the > > patched code at /usr/src/sys/compat/linux/ > > > > This kqueue call is very different from the one provided in man > > kqueue: > > > > int kqueue(void); > > > > so I really ran out of options on finding out what this kqueue call > > really is about. > > > > Would anyone have any pointers on this? > > > > 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. Thanks Gary! -- 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."