about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc/bits
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-05-03 15:00:31 -0500
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-05-03 15:04:54 -0500
commit83e7640f6bf68708ecf0b09d83c670203167271e (patch)
treefc3c69600db4b73d64e9c4855d5acae9ce99c727 /sysdeps/unix/sysv/linux/powerpc/bits
parentc31a5b1e8fecc794c4d0746a5a5af6db203005ea (diff)
downloadglibc-83e7640f6bf68708ecf0b09d83c670203167271e.tar.gz
glibc-83e7640f6bf68708ecf0b09d83c670203167271e.tar.xz
glibc-83e7640f6bf68708ecf0b09d83c670203167271e.zip
PowerPC: Add time vDSO support
PowerPC kernel now provides a vDSO implementation for time syscall
(commit fcb41a2030abe0eb716ef0798035ef9562097f42). This patch changes
time syscall wrapper to use the vDSO when available. It also changes
the default non vDSO time on PowerPC to use sysdeps/posix/time.c
(since gettimeofday is a vDSO call).
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/bits')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
index 5f5fc1eb3a..8b195db1bf 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
@@ -32,14 +32,16 @@ extern void *__vdso_get_tbfreq;
 
 extern void *__vdso_getcpu;
 
+extern void *__vdso_time;
+
 /* This macro is needed for PPC64 to return a skeleton OPD entry of a vDSO
    symbol.  This works because _dl_vdso_vsym always return the function
    address, and no vDSO symbols use the TOC or chain pointers from the OPD
    so we can allow them to be garbage.  */
 #if defined(__PPC64__) || defined(__powerpc64__)
-#define VDSO_IFUNC_RET(value)  &value
+#define VDSO_IFUNC_RET(value)  ((void *) &(value))
 #else
-#define VDSO_IFUNC_RET(value)  value
+#define VDSO_IFUNC_RET(value)  ((void *) (value))
 #endif
 
 #endif