From 625993dfbb085a3cde7492eda8ec1cdc1ee39a78 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 15 Jul 2014 16:53:13 -0700 Subject: Use VDSO for clock_gettime(2) and gettimeofday(2). Bug: 15387103 Change-Id: Ifc3608ea65060c1dc38120b10b6e79874f182a36 --- libc/arch-x86_64/syscalls/__clock_gettime.S | 16 ++++++++++++++++ libc/arch-x86_64/syscalls/__gettimeofday.S | 16 ++++++++++++++++ libc/arch-x86_64/syscalls/clock_gettime.S | 15 --------------- libc/arch-x86_64/syscalls/gettimeofday.S | 15 --------------- 4 files changed, 32 insertions(+), 30 deletions(-) create mode 100644 libc/arch-x86_64/syscalls/__clock_gettime.S create mode 100644 libc/arch-x86_64/syscalls/__gettimeofday.S delete mode 100644 libc/arch-x86_64/syscalls/clock_gettime.S delete mode 100644 libc/arch-x86_64/syscalls/gettimeofday.S (limited to 'libc/arch-x86_64') diff --git a/libc/arch-x86_64/syscalls/__clock_gettime.S b/libc/arch-x86_64/syscalls/__clock_gettime.S new file mode 100644 index 0000000..7e553b8 --- /dev/null +++ b/libc/arch-x86_64/syscalls/__clock_gettime.S @@ -0,0 +1,16 @@ +/* Generated by gensyscalls.py. Do not edit. */ + +#include + +ENTRY(__clock_gettime) + movl $__NR_clock_gettime, %eax + syscall + cmpq $-MAX_ERRNO, %rax + jb 1f + negl %eax + movl %eax, %edi + call __set_errno +1: + ret +END(__clock_gettime) +.hidden __clock_gettime diff --git a/libc/arch-x86_64/syscalls/__gettimeofday.S b/libc/arch-x86_64/syscalls/__gettimeofday.S new file mode 100644 index 0000000..a38eb64 --- /dev/null +++ b/libc/arch-x86_64/syscalls/__gettimeofday.S @@ -0,0 +1,16 @@ +/* Generated by gensyscalls.py. Do not edit. */ + +#include + +ENTRY(__gettimeofday) + movl $__NR_gettimeofday, %eax + syscall + cmpq $-MAX_ERRNO, %rax + jb 1f + negl %eax + movl %eax, %edi + call __set_errno +1: + ret +END(__gettimeofday) +.hidden __gettimeofday diff --git a/libc/arch-x86_64/syscalls/clock_gettime.S b/libc/arch-x86_64/syscalls/clock_gettime.S deleted file mode 100644 index 20850c8..0000000 --- a/libc/arch-x86_64/syscalls/clock_gettime.S +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated by gensyscalls.py. Do not edit. */ - -#include - -ENTRY(clock_gettime) - movl $__NR_clock_gettime, %eax - syscall - cmpq $-MAX_ERRNO, %rax - jb 1f - negl %eax - movl %eax, %edi - call __set_errno -1: - ret -END(clock_gettime) diff --git a/libc/arch-x86_64/syscalls/gettimeofday.S b/libc/arch-x86_64/syscalls/gettimeofday.S deleted file mode 100644 index 4867c30..0000000 --- a/libc/arch-x86_64/syscalls/gettimeofday.S +++ /dev/null @@ -1,15 +0,0 @@ -/* Generated by gensyscalls.py. Do not edit. */ - -#include - -ENTRY(gettimeofday) - movl $__NR_gettimeofday, %eax - syscall - cmpq $-MAX_ERRNO, %rax - jb 1f - negl %eax - movl %eax, %edi - call __set_errno -1: - ret -END(gettimeofday) -- cgit v1.1