<div class="gmail_extra">I'll try, this week end, thanks.<br><br><div class="gmail_quote">On Thu, Apr 26, 2012 at 4:05 AM, Rafaël Carré <span dir="ltr"><<a href="mailto:funman@videolan.org" target="_blank">funman@videolan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
Does this help?<br>
<br>
vlc-android/jni/Android.mk | 2 +-<br>
vlc-android/jni/eventfd.c | 26 ++++++++++++++++++++++++++<br>
2 files changed, 27 insertions(+), 1 deletion(-)<br>
create mode 100644 vlc-android/jni/eventfd.c<br>
<br>
diff --git a/vlc-android/jni/Android.mk b/vlc-android/jni/Android.mk<br>
index d9b8ba5..c6642e6 100644<br>
--- a/vlc-android/jni/Android.mk<br>
+++ b/vlc-android/jni/Android.mk<br>
@@ -3,7 +3,7 @@ include $(CLEAR_VARS)<br>
<br>
LOCAL_MODULE := libvlcjni<br>
<br>
-LOCAL_SRC_FILES := libvlcjni.c aout.c thumbnailer.c pthread-condattr.c pthread-rwlocks.c<br>
+LOCAL_SRC_FILES := libvlcjni.c aout.c thumbnailer.c pthread-condattr.c pthread-rwlocks.c eventfd.c<br>
<br>
LOCAL_C_INCLUDES := $(VLC_SRC_DIR)/include<br>
<br>
diff --git a/vlc-android/jni/eventfd.c b/vlc-android/jni/eventfd.c<br>
new file mode 100644<br>
index 0000000..d58d1d2<br>
--- /dev/null<br>
+++ b/vlc-android/jni/eventfd.c<br>
@@ -0,0 +1,26 @@<br>
+#include <sys/linux-syscalls.h><br>
+#include <errno.h><br>
+<br>
+int eventfd(unsigned int initval, int flags)<br>
+{<br>
+ int ret;<br>
+ int syscall_nr = __NR_eventfd2;<br>
+<br>
+ asm(<br>
+ "mov r0, %[initval] \n\t"<br>
+ "mov r1, %[flags] \n\t"<br>
+ "mov r7, %[nr] \n\t"<br>
+ "svc #0 \n\t"<br>
+ "mov %[ret], r0 \n\t"<br>
+ : [ret] "=r" (ret)<br>
+ : [initval] "r" (initval), [flags] "r" (flags), [nr] "r" (syscall_nr)<br>
+ : "r7"<br>
+ );<br>
+<br>
+ if (ret < 0) {<br>
+ errno = -ret;<br>
+ return -1;<br>
+ }<br>
+<br>
+ return ret;<br>
+}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
_______________________________________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org">Android@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/android" target="_blank">http://mailman.videolan.org/listinfo/android</a><br>
</font></span></blockquote></div><br></div>