mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* sysdeps/unix/sysv/linux/clock_gettime.c (maybe_syscall_gettime_cpu):
Build fix for systems which might lack POSIX timer support.
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
2007-08-12 Ulrich Drepper <drepper@redhat.com>
|
2007-08-12 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/clock_gettime.c (maybe_syscall_gettime_cpu):
|
||||||
|
Build fix for systems which might lack POSIX timer support.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/x86_64/libc-start.c
|
* sysdeps/unix/sysv/linux/x86_64/libc-start.c
|
||||||
(_libc_vdso_platform_setup): Mangle function pointers before storing
|
(_libc_vdso_platform_setup): Mangle function pointers before storing
|
||||||
them.
|
them.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* clock_gettime -- Get current time from a POSIX clockid_t. Linux version.
|
/* clock_gettime -- Get current time from a POSIX clockid_t. Linux version.
|
||||||
Copyright (C) 2003,2004,2005,2006 Free Software Foundation, Inc.
|
Copyright (C) 2003,2004,2005,2006,2007 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -133,11 +133,19 @@ maybe_syscall_gettime_cpu (clockid_t clock_id, struct timespec *tp)
|
|||||||
{
|
{
|
||||||
if (e == EINVAL)
|
if (e == EINVAL)
|
||||||
{
|
{
|
||||||
|
# ifdef HAVE_CLOCK_GETRES_VSYSCALL
|
||||||
/* Check whether the kernel supports CPU clocks at all.
|
/* Check whether the kernel supports CPU clocks at all.
|
||||||
If not, record it for the future. */
|
If not, record it for the future. */
|
||||||
r = INTERNAL_VSYSCALL (clock_getres, err, 2,
|
r = INTERNAL_VSYSCALL (clock_getres, err, 2,
|
||||||
|
MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
|
||||||
|
NULL);
|
||||||
|
# else
|
||||||
|
/* Check whether the kernel supports CPU clocks at all.
|
||||||
|
If not, record it for the future. */
|
||||||
|
r = INTERNAL_SYSCALL (clock_getres, err, 2,
|
||||||
MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
|
MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
|
||||||
NULL);
|
NULL);
|
||||||
|
# endif
|
||||||
if (INTERNAL_SYSCALL_ERROR_P (r, err))
|
if (INTERNAL_SYSCALL_ERROR_P (r, err))
|
||||||
__libc_missing_posix_cpu_timers = 1;
|
__libc_missing_posix_cpu_timers = 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user