From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH 04/13] qemu-kvm: Remove eventfd compat header Date: Sun, 3 Jul 2011 12:57:43 +0300 Message-ID: <20110703095743.GB14862@redhat.com> References: <20110628110908.GB5661@redhat.com> <4E103A8B.70602@mgpi.de> <20110703095406.GA14862@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kiszka , Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org, Alex Williamson To: Bernhard Held Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46073 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755258Ab1GCJ5Z (ORCPT ); Sun, 3 Jul 2011 05:57:25 -0400 Content-Disposition: inline In-Reply-To: <20110703095406.GA14862@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Jul 03, 2011 at 12:54:06PM +0300, Michael S. Tsirkin wrote: > On Sun, Jul 03, 2011 at 11:46:51AM +0200, Bernhard Held wrote: > > #ifndef _COMPAT_SYS_EVENTFD > > #define _COMPAT_SYS_EVENTFD > > > > #include > > #include > > > > /* Flags for signalfd. */ > > enum > > { > > EFD_SEMAPHORE = 1, > > #define EFD_SEMAPHORE EFD_SEMAPHORE > > EFD_CLOEXEC = 02000000, > > #define EFD_CLOEXEC EFD_CLOEXEC > > EFD_NONBLOCK = 04000 > > #define EFD_NONBLOCK EFD_NONBLOCK > > }; > > > > #ifndef __NR_eventfd2 > > #if defined(__x86_64__) > > #define __NR_eventfd2 290 > > #elif defined(__i386__) > > #define __NR_eventfd2 328 > > #else > > #error Cannot detect your architecture! > > #endif > > #endif > > Can't we use SYS_eventfd2 instead? Looks like we can't, but __NR_eventfd2 does seem to exit? > > static inline int eventfd (int count, int flags) > > { > > return syscall(__NR_eventfd2, count, flags); > > } > > > > #endif > > >