From 18160256840e9bb097f17422ea47d54fabbc9f3f Mon Sep 17 00:00:00 2001 From: Haruki Hasegawa Date: Mon, 13 Oct 2014 00:50:47 +0900 Subject: Add clock_settime and clock_nanosleep. Add the missing prototypes, fix the existing prototypes to use clockid_t rather than int, fix clock_nanosleep's failure behavior, and add simple tests. Bug: 17644443 Bug: https://code.google.com/p/android/issues/detail?id=77372 Change-Id: I03fba369939403918abcabae9551a7123953d780 Signed-off-by: Haruki Hasegawa --- libc/arch-x86_64/syscalls/__clock_nanosleep.S | 17 +++++++++++++++++ libc/arch-x86_64/syscalls/clock_nanosleep.S | 16 ---------------- 2 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 libc/arch-x86_64/syscalls/__clock_nanosleep.S delete mode 100644 libc/arch-x86_64/syscalls/clock_nanosleep.S (limited to 'libc/arch-x86_64') diff --git a/libc/arch-x86_64/syscalls/__clock_nanosleep.S b/libc/arch-x86_64/syscalls/__clock_nanosleep.S new file mode 100644 index 0000000..37726c0 --- /dev/null +++ b/libc/arch-x86_64/syscalls/__clock_nanosleep.S @@ -0,0 +1,17 @@ +/* Generated by gensyscalls.py. Do not edit. */ + +#include + +ENTRY(__clock_nanosleep) + movq %rcx, %r10 + movl $__NR_clock_nanosleep, %eax + syscall + cmpq $-MAX_ERRNO, %rax + jb 1f + negl %eax + movl %eax, %edi + call __set_errno_internal +1: + ret +END(__clock_nanosleep) +.hidden __clock_nanosleep diff --git a/libc/arch-x86_64/syscalls/clock_nanosleep.S b/libc/arch-x86_64/syscalls/clock_nanosleep.S deleted file mode 100644 index 2a79bdd..0000000 --- a/libc/arch-x86_64/syscalls/clock_nanosleep.S +++ /dev/null @@ -1,16 +0,0 @@ -/* Generated by gensyscalls.py. Do not edit. */ - -#include - -ENTRY(clock_nanosleep) - movq %rcx, %r10 - movl $__NR_clock_nanosleep, %eax - syscall - cmpq $-MAX_ERRNO, %rax - jb 1f - negl %eax - movl %eax, %edi - call __set_errno_internal -1: - ret -END(clock_nanosleep) -- cgit v1.1