Masatake YAMATO wrote: > Before my change ltp own eventfd wrapper calls eventfd > system call like this: > > static int > myeventfd(unsigned int initval, int flags) > { > return syscall(__NR_eventfd, initval); > } > > As you can see, FLAGS argument is not used. I guess > this is a bug. So I changed like: > > static int > myeventfd(unsigned int initval, int flags) > { > return syscall(__NR_eventfd, initval, flags); > }
The eventfd() syscall does not have a flags argument. But there is another syscall recently introduced in the kernel(> 2.6.27) called eventfd2() which has the flags argument. From the eventfd() man page http://www.kernel.org/doc/man-pages/online/pages/man2/eventfd.2.html <quote> There are two underlying Linux system calls: eventfd() and the more recent eventfd2(). The former system call does not implement a flags argument. The latter system call implements the flags values described above. The glibc wrapper function will use eventfd2() where it is available. </quote> You can also check the code http://lxr.linux.no/linux+v2.6.27.10/fs/eventfd.c#L201 Regards, Vijay ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list