aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-11-15 13:29:11 -0500
committerUlrich Drepper <drepper@gmail.com>2011-11-15 13:29:11 -0500
commit116415f80eeb88e1973a160b8a2ee707d24481b4 (patch)
tree2dd24107d610a0bdff14fc01a0ded3ffb0b7adf9
parent8056ea641faa89225cffcf8507cd20de95b8b6ae (diff)
parent446514f97eaf555200f9ec4f369223f984e638a5 (diff)
downloadglibc-116415f80eeb88e1973a160b8a2ee707d24481b4.zip
glibc-116415f80eeb88e1973a160b8a2ee707d24481b4.tar.gz
glibc-116415f80eeb88e1973a160b8a2ee707d24481b4.tar.bz2
Merge branch 'master' of ssh://sourceware.org/git/glibc
Conflicts: sysdeps/unix/sysv/linux/clock_gettime.c
-rw-r--r--ChangeLog11
-rw-r--r--sysdeps/unix/sysv/linux/clock_gettime.c3
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/clock_gettime.c8
3 files changed, 14 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c9002e..84cd700 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,10 @@
-2011-11-15 Ulrich Drepper <drepper@gmail.com>
-
- * sysdeps/unix/sysv/linux/clock_gettime.c (SYSDEP_GETTIME_CPU): If
- __ASSUME_POSIX_CPU_TIMERS is defined assign the result of the syscall
- to retval and return.
-
2011-11-15 Andreas Schwab <schwab@redhat.com>
+ * sysdeps/unix/sysv/linux/clock_gettime.c (SYSDEP_GETTIME_CPU)
+ [__ASSUME_POSIX_CPU_TIMERS > 0]: Assign to retval and break.
+ * sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
+ (SYSCALL_GETTIME): Set errno on error.
+
* sysdeps/unix/sysv/linux/check_pf.c (make_request): Properly
count references to noai6ai_cached.
diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c
index 0d7e027..ad0fe1e 100644
--- a/sysdeps/unix/sysv/linux/clock_gettime.c
+++ b/sysdeps/unix/sysv/linux/clock_gettime.c
@@ -111,7 +111,8 @@ maybe_syscall_gettime (clockid_t clock_id, struct timespec *tp)
# if __ASSUME_POSIX_CPU_TIMERS > 0
# define SYSDEP_GETTIME_CPU(clock_id, tp) \
- retval = SYSCALL_GETTIME (clock_id, tp); break
+ retval = SYSCALL_GETTIME (clock_id, tp); \
+ break
# define SYSDEP_GETTIME_CPUTIME /* Default catches them too. */
# else
diff --git a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
index 7802701..f712110 100644
--- a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
+++ b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
@@ -3,8 +3,14 @@
#ifdef SHARED
# define SYSCALL_GETTIME(id, tp) \
({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
+ long int v_ret; \
PTR_DEMANGLE (f); \
- f (id, tp); })
+ v_ret = f (id, tp); \
+ if (INTERNAL_SYSCALL_ERROR_P (v_ret, )) { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (v_ret, )); \
+ v_ret = -1; \
+ } \
+ v_ret; })
# define INTERNAL_GETTIME(id, tp) \
({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
PTR_DEMANGLE (f); \