From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/331 Path: news.gmane.org!not-for-mail From: Serge Ziryukin Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] add eventfd syscall wrapper and helper Date: Thu, 5 May 2011 08:27:34 +0300 Message-ID: References: <1304539185-25729-1-git-send-email-ftrvxmtrx@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1312595728 11622 80.91.229.12 (6 Aug 2011 01:55:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2011 01:55:28 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: envelope-from@hidden Thu May 05 05:27:57 2011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; DomainKey-Signature: a=rsa-sha1; c=nofws; In-Reply-To: <20110505041556.GP277@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:331 Archived-At: On Thu, May 5, 2011 at 7:15 AM, Rich Felker wrote: > On Wed, May 04, 2011 at 10:59:45PM +0300, Serge Ziryukin wrote: >> abstractions are: >> >> typedef uint64_t eventfd_t; >> int eventfd_read(int fd, eventfd_t *value); >> int eventfd_write(int fd, eventfd_t value); >> >> these are trying to hide the details of reading and writing >> on an eventfd descriptor. > > Seems silly, but if that's the usual API I have no objections. It's > small anyway. > >> +int eventfd(unsigned int count, int flags) >> +{ >> + =C2=A0 =C2=A0 return syscall(SYS_eventfd, count, flags); >> +} > > Shouldn't this be flags ? SYS_eventfd2 : SYS_eventfd...? The old > SYS_eventfd supposedly does not support flags. > Oh, sorry. My mistake.