From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Kerrisk Subject: Re: [patch/rfc] eventfd semaphore-like behavior Date: Thu, 5 Feb 2009 12:49:31 +1300 Message-ID: References: <20090204150507.665b5b7c.akpm@linux-foundation.org> Reply-To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ulrich Drepper Cc: Andrew Morton , Davide Libenzi , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org On Thu, Feb 5, 2009 at 12:45 PM, Ulrich Drepper wrote: > On Wed, Feb 4, 2009 at 3:05 PM, Andrew Morton wrote: >> How would you recommend that userspace determine whether its kernel >> supports this feature, bearing in mind that someone might backport this >> patch into arbitrarily earlier kernel versions? > > fd = eventfd2 (CNT, EFD_SEMAPHORE); > if (fd == -1 && errno == EINVAL) > puts("cannot handled EFD_SEMAPHORE"); Crossed mails. Ulrich put the point more succinctly. -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html