aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sparc/sysdep.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-10-18 11:42:19 -0700
committerDavid S. Miller <davem@davemloft.net>2018-10-18 11:44:32 -0700
commit94a3a27f5df24a69420c80fb83f07c8cf7671938 (patch)
treeab6cabdcab811aad4f3635770c785f373014c9e9 /sysdeps/unix/sysv/linux/sparc/sysdep.h
parent0a271c8f25a8342f7c36b999f4f7bad2d4067a8e (diff)
downloadglibc-94a3a27f5df24a69420c80fb83f07c8cf7671938.tar
glibc-94a3a27f5df24a69420c80fb83f07c8cf7671938.tar.gz
glibc-94a3a27f5df24a69420c80fb83f07c8cf7671938.tar.bz2
glibc-94a3a27f5df24a69420c80fb83f07c8cf7671938.zip
Add VDSO support to sparc.
* sysdeps/unix/sysv/linux/sparc/init-first.c: New file. * sysdeps/unix/sysv/linux/sparc/libc-vdso.h: New file. * sysdeps/unix/sysv/linux/sparc/Makefile: Add dl-vdso to sysdep_routines in subdir elf. * sysdeps/unix/sysv/linux/sparc/Versions: Add GLIBC_PRIVATE version for __vdso_clock_gettime. * sysdeps/unix/sysv/linux/sparc/sysdep.h (INTERNAL_VSYSCALL_CALL): Define. (HAVE_CLOCK_GETTIME_VSYSCALL): Define. (HAVE_GETTIMEOFDAY_VSYSCALL): Define.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sysdep.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sysdep.h
index fd06a4349e..5fb7828a05 100644
--- a/sysdeps/unix/sysv/linux/sparc/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sysdep.h
@@ -34,6 +34,17 @@
#else /* __ASSEMBLER__ */
+#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
+ ({ \
+ long _ret = funcptr (args); \
+ err = ((unsigned long) (_ret) >= (unsigned long) -4095L); \
+ _ret; \
+ })
+
+/* List of system calls which are supported as vsyscalls. */
+# define HAVE_CLOCK_GETTIME_VSYSCALL 1
+# define HAVE_GETTIMEOFDAY_VSYSCALL 1
+
#undef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) \
({ INTERNAL_SYSCALL_DECL(err); \