Merge "libc: arch-x86: implement kernel vdso time functions"

This commit is contained in:
Elliott Hughes 2015-07-22 01:51:00 +00:00 committed by Gerrit Code Review
commit 3b49d61ac2
4 changed files with 10 additions and 11 deletions

View file

@ -333,7 +333,7 @@ int __set_tls:set_thread_area(void*) mips,mips64
int __set_thread_area:set_thread_area(void*) x86
# vdso stuff.
int clock_gettime(clockid_t, timespec*) arm,mips,mips64,x86
int __clock_gettime:clock_gettime(clockid_t, timespec*) arm64,x86_64
int gettimeofday(timeval*, timezone*) arm,mips,mips64,x86
int __gettimeofday:gettimeofday(timeval*, timezone*) arm64,x86_64
int clock_gettime(clockid_t, timespec*) arm,mips,mips64
int __clock_gettime:clock_gettime(clockid_t, timespec*) arm64,x86,x86_64
int gettimeofday(timeval*, timezone*) arm,mips,mips64
int __gettimeofday:gettimeofday(timeval*, timezone*) arm64,x86,x86_64

View file

@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
ENTRY(clock_gettime)
ENTRY(__clock_gettime)
pushl %ebx
.cfi_def_cfa_offset 8
.cfi_rel_offset ebx, 0
@ -23,4 +23,4 @@ ENTRY(clock_gettime)
popl %ecx
popl %ebx
ret
END(clock_gettime)
END(__clock_gettime)

View file

@ -2,7 +2,7 @@
#include <private/bionic_asm.h>
ENTRY(gettimeofday)
ENTRY(__gettimeofday)
pushl %ebx
.cfi_def_cfa_offset 8
.cfi_rel_offset ebx, 0
@ -23,4 +23,4 @@ ENTRY(gettimeofday)
popl %ecx
popl %ebx
ret
END(gettimeofday)
END(__gettimeofday)

View file

@ -19,13 +19,12 @@
#include <sys/auxv.h>
#include <unistd.h>
// x86 has a vdso, but there's nothing useful to us in it.
#if defined(__aarch64__) || defined(__x86_64__)
#if defined(__aarch64__) || defined(__x86_64__) || defined (__i386__)
#if defined(__aarch64__)
#define VDSO_CLOCK_GETTIME_SYMBOL "__kernel_clock_gettime"
#define VDSO_GETTIMEOFDAY_SYMBOL "__kernel_gettimeofday"
#elif defined(__x86_64__)
#elif defined(__x86_64__) || defined(__i386__)
#define VDSO_CLOCK_GETTIME_SYMBOL "__vdso_clock_gettime"
#define VDSO_GETTIMEOFDAY_SYMBOL "__vdso_gettimeofday"
#endif