From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/330 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] add eventfd syscall wrapper and helper Date: Thu, 5 May 2011 00:15:56 -0400 Message-ID: <20110505041556.GP277@brightrain.aerifal.cx> 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=us-ascii X-Trace: dough.gmane.org 1312595727 11618 80.91.229.12 (6 Aug 2011 01:55:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 6 Aug 2011 01:55:27 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: envelope-from@hidden Thu May 05 04:23:26 2011 Content-Disposition: inline In-Reply-To: <1304539185-25729-1-git-send-email-ftrvxmtrx@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:330 Archived-At: 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) > +{ > + return syscall(SYS_eventfd, count, flags); > +} Shouldn't this be flags ? SYS_eventfd2 : SYS_eventfd...? The old SYS_eventfd supposedly does not support flags. Rich