summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2016-01-26 21:26:34 +0100
committerRich Felker <dalias@aerifal.cx>2016-01-27 12:40:24 -0500
commitb0bf52f3e9fd246762958821fdc2851add05d423 (patch)
tree981d8556be59ecb30f5b2ce468651e40e0a2fd8f
parenta5ba2d7507eb6b4388c47f7893e025185496ff90 (diff)
downloadmusl-b0bf52f3e9fd246762958821fdc2851add05d423.tar.gz
mips: add vdso support
vdso support is available on mips starting with kernel 4.4, see kernel commit a7f4df4e21 "MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime()" for details. In Linux kernel 4.4.0 the mips code returns -ENOSYS in case it can not handle the vdso call and assumes the libc will call the original syscall in this case. Handle this case in musl. Currently Linux kernel 4.4.0 handles the following types: CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, CLOCK_REALTIME and CLOCK_MONOTONIC.
-rw-r--r--arch/mips/syscall_arch.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/syscall_arch.h b/arch/mips/syscall_arch.h
index e74e0ad0..39c0ea32 100644
--- a/arch/mips/syscall_arch.h
+++ b/arch/mips/syscall_arch.h
@@ -161,3 +161,7 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
if (n == SYS_fstatat) __stat_fix(c);
return r2;
}
+
+#define VDSO_USEFUL
+#define VDSO_CGT_SYM "__vdso_clock_gettime"
+#define VDSO_CGT_VER "LINUX_2.6"