Bionic: Fix wrong prototype of system call clock_nanosleep
In bionic/libc/SYSCALLS.TXT, the prototype of system call
clock_nanosleep is incorrect.
According to man page:
int clock_nanosleep(clockid_t clock_id, int flags,
const struct timespec *request,
struct timespec *remain);
Change-Id: Ic44c6db3d632293aa17998035554eacd664c2d57
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
diff --git a/libc/arch-x86/syscalls/clock_nanosleep.S b/libc/arch-x86/syscalls/clock_nanosleep.S
index c400e3f..23e1e6f 100644
--- a/libc/arch-x86/syscalls/clock_nanosleep.S
+++ b/libc/arch-x86/syscalls/clock_nanosleep.S
@@ -9,8 +9,12 @@
clock_nanosleep:
pushl %ebx
pushl %ecx
- mov 12(%esp), %ebx
- mov 16(%esp), %ecx
+ pushl %edx
+ pushl %esi
+ mov 20(%esp), %ebx
+ mov 24(%esp), %ecx
+ mov 28(%esp), %edx
+ mov 32(%esp), %esi
movl $__NR_clock_nanosleep, %eax
int $0x80
cmpl $-129, %eax
@@ -21,6 +25,8 @@
addl $4, %esp
orl $-1, %eax
1:
+ popl %esi
+ popl %edx
popl %ecx
popl %ebx
ret