From nobody Tue Jan 10 23:29:35 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ns6V40zT3z2qn1l for ; Tue, 10 Jan 2023 23:29:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ns6V32FJYz3NTs for ; Tue, 10 Jan 2023 23:29:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 30ANTak8099609 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 11 Jan 2023 01:29:39 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 30ANTak8099609 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 30ANTZnI099606; Wed, 11 Jan 2023 01:29:35 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 11 Jan 2023 01:29:35 +0200 From: Konstantin Belousov To: Jake Freeland Cc: freebsd-hackers@freebsd.org Subject: Re: Syscalls: eventfd and timerfd Message-ID: References: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Ns6V32FJYz3NTs X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, Jan 10, 2023 at 05:21:42PM -0600, Jake Freeland wrote: > Hi there, > > I am currently working on moving the linux_compat implementation of > timerfd (in sys/compat/linux/linux_event.c) into its own FreeBSD syscall > similar to what was done for eventfd. This is my first time implementing > a syscall, so I have been following the eventfd implementation as a > reference. I noticed that the eventfd syscall entries are absent from > sys/kern/syscalls.master and I am not sure why. Was eventfd never > formally added as a syscall entry or am I missing something? I was > planning on adding timerfd entries to syscalls.master, but now I am > unsure how to proceed. There is no eventfd(2) in FreeBSD. There is __specialfd(2) syscall #577, which dispatches based on type. The libc wrapper provides eventfd(3) API.