aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h12
-rw-r--r--sysdeps/unix/sysv/linux/tile/init-first.c6
-rw-r--r--sysdeps/unix/sysv/linux/tile/sysdep.h8
4 files changed, 27 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 123b0b2..8482b88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2015-01-05 Chris Metcalf <cmetcalf@ezchip.com>
+ * sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h: Fix return type
+ for __vdso_* functions in declarations.
+ * sysdeps/unix/sysv/linux/tile/init-first.c: Likewise for
+ definitions.
+ * sysdeps/unix/sysv/linux/tile/sysdep.h (INLINE_VSYSCALL,
+ INTERNAL_VSYSCALL): Use struct return types to check for error.
+
* sysdeps/ieee754/dbl-64/wordsize-64/s_llround.c [!defined _LP64
&& REGISTER_CAST_INT32_TO_INT64]: Provide explicit lround()
function with cast from llround().
diff --git a/sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h
index cc720f1..44f8286 100644
--- a/sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h
+++ b/sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h
@@ -22,10 +22,18 @@
#ifdef SHARED
-extern long int (*__vdso_gettimeofday) (struct timeval *, void *)
+struct syscall_return_value
+{
+ long int value;
+ long int error;
+};
+
+extern struct syscall_return_value (*__vdso_gettimeofday) (struct timeval *,
+ void *)
attribute_hidden;
-extern long int (*__vdso_clock_gettime) (clockid_t, struct timespec *);
+extern struct syscall_return_value (*__vdso_clock_gettime) (clockid_t,
+ struct timespec *);
#endif
diff --git a/sysdeps/unix/sysv/linux/tile/init-first.c b/sysdeps/unix/sysv/linux/tile/init-first.c
index 6e7917c..75dbfd7 100644
--- a/sysdeps/unix/sysv/linux/tile/init-first.c
+++ b/sysdeps/unix/sysv/linux/tile/init-first.c
@@ -19,9 +19,11 @@
#include <dl-vdso.h>
#include <bits/libc-vdso.h>
-long int (*__vdso_gettimeofday) (struct timeval *, void *) attribute_hidden;
+struct syscall_return_value (*__vdso_gettimeofday) (struct timeval *, void *)
+ attribute_hidden;
-long int (*__vdso_clock_gettime) (clockid_t, struct timespec *)
+struct syscall_return_value (*__vdso_clock_gettime) (clockid_t,
+ struct timespec *)
__attribute__ ((nocommon));
strong_alias (__vdso_clock_gettime, __GI___vdso_clock_gettime attribute_hidden)
diff --git a/sysdeps/unix/sysv/linux/tile/sysdep.h b/sysdeps/unix/sysv/linux/tile/sysdep.h
index 074b916..64c8920 100644
--- a/sysdeps/unix/sysv/linux/tile/sysdep.h
+++ b/sysdeps/unix/sysv/linux/tile/sysdep.h
@@ -217,7 +217,9 @@
__typeof (__vdso_##name) vdsop = __vdso_##name; \
if (vdsop != NULL) \
{ \
- sc_ret = vdsop (args); \
+ struct syscall_return_value rv = vdsop (args); \
+ sc_ret = rv.value; \
+ sc_err = rv.error; \
if (!INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \
goto out; \
if (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err) != ENOSYS) \
@@ -242,7 +244,9 @@
__typeof (__vdso_##name) vdsop = __vdso_##name; \
if (vdsop != NULL) \
{ \
- v_ret = vdsop (args); \
+ struct syscall_return_value rv = vdsop (args); \
+ v_ret = rv.value; \
+ err = rv.error; \
if (!INTERNAL_SYSCALL_ERROR_P (v_ret, err) \
|| INTERNAL_SYSCALL_ERRNO (v_ret, err) != ENOSYS) \
goto out; \