Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
b88d59d7
Commit
b88d59d7
authored
Apr 25, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing eventfd syscall for 2.2
parent
b203f772
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
vlc-android/jni/Android.mk
vlc-android/jni/Android.mk
+1
-1
vlc-android/jni/eventfd.c
vlc-android/jni/eventfd.c
+46
-0
No files found.
vlc-android/jni/Android.mk
View file @
b88d59d7
...
...
@@ -3,7 +3,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE
:=
libvlcjni
LOCAL_SRC_FILES
:=
libvlcjni.c aout.c thumbnailer.c pthread-condattr.c pthread-rwlocks.c
LOCAL_SRC_FILES
:=
libvlcjni.c aout.c thumbnailer.c pthread-condattr.c pthread-rwlocks.c
eventfd.c
LOCAL_C_INCLUDES
:=
$(VLC_SRC_DIR)
/include
...
...
vlc-android/jni/eventfd.c
0 → 100644
View file @
b88d59d7
/*****************************************************************************
* libvlcjni.c
*****************************************************************************
* Copyright © 2012 Rafaël Carré
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <sys/linux-syscalls.h>
#include <errno.h>
int
eventfd
(
unsigned
int
initval
,
int
flags
)
{
int
ret
;
int
syscall_nr
=
__NR_eventfd2
;
asm
(
"mov r0, %[initval]
\n\t
"
"mov r1, %[flags]
\n\t
"
"mov r7, %[nr]
\n\t
"
"svc #0
\n\t
"
"mov %[ret], r0
\n\t
"
:
[
ret
]
"=r"
(
ret
)
:
[
initval
]
"r"
(
initval
),
[
flags
]
"r"
(
flags
),
[
nr
]
"r"
(
syscall_nr
)
:
"r7"
);
if
(
ret
<
0
)
{
errno
=
-
ret
;
return
-
1
;
}
return
ret
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment