Re: [PATCH 04/13] qemu-kvm: Remove eventfd compat header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 03, 2011 at 11:46:51AM +0200, Bernhard Held wrote:
> #ifndef _COMPAT_SYS_EVENTFD
> #define _COMPAT_SYS_EVENTFD
> 
> #include <unistd.h>
> #include <syscall.h>
> 
> /* 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?

> static inline int eventfd (int count, int flags)
> {
> 	return syscall(__NR_eventfd2, count, flags);
> }
> 
> #endif
> 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux