[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r20463 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/ sysdeps/unix/sysv/linux/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r20463 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/unix/sysv/linux/ sysdeps/unix/sysv/linux/
- From: eglibc@xxxxxxxxxx
- Date: Sun, 02 Sep 2012 00:01:43 -0000
Author: eglibc
Date: Sun Sep 2 00:01:42 2012
New Revision: 20463
Log:
Import glibc-mainline for 2012-09-02
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/configure
fsf/trunk/libc/configure.in
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_getres.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_gettime.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_settime.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Sep 2 00:01:42 2012
@@ -1,3 +1,32 @@
+2012-09-01 Allan McRae <allan@xxxxxxxxxxxxx>
+
+ [BZ #13412]
+ * configure.in (AWK): Require gawk version 3.0 or later.
+ * configure: Regenerated.
+
+2012-09-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_POSIX_CPU_TIMERS): Remove.
+ * sysdeps/unix/sysv/linux/clock_getcpuclockid.c
+ [__NR_clock_getres]: Make code unconditional.
+ [!__ASSUME_POSIX_CPU_TIMERS]: Remoce conditional code.
+ (clock_getcpuclockid): Remove code left unreachable by removal of
+ conditionals.
+ * sysdeps/unix/sysv/linux/clock_getres.c [__NR_clock_getres]: Make
+ code unconditional.
+ [__ASSUME_POSIX_CPU_TIMERS]: Likewise.
+ [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/clock_gettime.c [__NR_clock_gettime]:
+ Make code unconditional.
+ [__ASSUME_POSIX_CPU_TIMERS]: Likewise.
+ [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/clock_settime.c
+ [__ASSUME_POSIX_CPU_TIMERS <= 0 && __NR_clock_settime]: Remove
+ conditional code.
+ [__ASSUME_POSIX_CPU_TIMERS]: Make code unconditional.
+ [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
+
2012-08-29 H.J. Lu <hongjiu.lu@xxxxxxxxx>
[BZ #14476]
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sun Sep 2 00:01:42 2012
@@ -9,10 +9,10 @@
* The following bugs are resolved with this release:
- 3479, 5400, 6778, 6808, 9685, 11607, 13717, 13696, 13939, 14042, 14090,
- 14166, 14150, 14151, 14154, 14157, 14166, 14173, 14195, 14252, 14283,
- 14298, 14303, 14307, 14328, 14331, 14336, 14337, 14347, 14349, 14459,
- 14476, 14505, 14516, 14519, 14532
+ 3479, 5400, 6778, 6808, 9685, 11607, 13412, 13717, 13696, 13939, 14042,
+ 14090, 14166, 14150, 14151, 14154, 14157, 14166, 14173, 14195, 14252,
+ 14283, 14298, 14303, 14307, 14328, 14331, 14336, 14337, 14347, 14349,
+ 14459, 14476, 14505, 14516, 14519, 14532
* Support for STT_GNU_IFUNC symbols added for s390 and s390x.
Optimized versions of memcpy, memset, and memcmp added for System z10 and
Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Sun Sep 2 00:01:42 2012
@@ -623,7 +623,6 @@
BISON
INSTALL_INFO
PERL
-AWK
libc_cv_have_ksh
KSH
libc_cv_have_bash2
@@ -634,6 +633,7 @@
AUTOCONF
NM
READELF
+AWK
SED
MAKEINFO
MSGFMT
@@ -5002,6 +5002,69 @@
SED=: aux_missing="$aux_missing sed"
fi
+for ac_prog in gawk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+if test -z "$AWK"; then
+ ac_verc_fail=yes
+else
+ # Found it, now check the version.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $AWK" >&5
+$as_echo_n "checking version of $AWK... " >&6; }
+ ac_prog_version=`$AWK --version 2>&1 | sed -n 's/^.*GNU Awk[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ [3-9].*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
+$as_echo "$ac_prog_version" >&6; }
+fi
+if test $ac_verc_fail = yes; then
+ critic_missing="$critic_missing gawk"
+fi
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
@@ -5438,48 +5501,6 @@
libc_cv_have_ksh=yes
fi
-
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AWK" && break
-done
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
@@ -8121,7 +8142,6 @@
ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
-AWK='$AWK'
test -n "\$AWK" || AWK=awk
_ACEOF
Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Sun Sep 2 00:01:42 2012
@@ -926,6 +926,9 @@
[GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)],
[3.0[2-9]*|3.[1-9]*|[4-9]*],
SED=: aux_missing="$aux_missing sed")
+AC_CHECK_PROG_VER(AWK, gawk, --version,
+ [GNU Awk[^0-9]*\([0-9][0-9.]*\)],
+ [[3-9].*], critic_missing="$critic_missing gawk")
AC_CHECK_TOOL(READELF, readelf, false)
AC_CHECK_TOOL(NM, nm, false)
@@ -1043,7 +1046,6 @@
fi
AC_SUBST(libc_cv_have_ksh)
-AC_PROG_AWK
AC_PATH_PROG(PERL, perl, no)
if test "$PERL" != no &&
(eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sun Sep 2 00:01:42 2012
@@ -1,3 +1,11 @@
+2012-09-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
+ [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
+ [__NR_clock_getres]: Make code unconditional.
+ (pthread_getcpuclockid): Remove code left unreachable by removal
+ of conditionals.
+
2012-08-31 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
[BZ #14532]
Modified: fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c (original)
+++ fsf/trunk/libc/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c Sun Sep 2 00:01:42 2012
@@ -24,10 +24,6 @@
#include <kernel-posix-cpu-timers.h>
-#if !(__ASSUME_POSIX_CPU_TIMERS > 0)
-int __libc_missing_posix_cpu_timers attribute_hidden;
-#endif
-
int
pthread_getcpuclockid (threadid, clockid)
pthread_t threadid;
@@ -40,55 +36,10 @@
/* Not a valid thread handle. */
return ESRCH;
-#ifdef __NR_clock_getres
- /* The clockid_t value is a simple computation from the TID.
- But we do a clock_getres call to validate it if we aren't
- yet sure we have the kernel support. */
+ /* The clockid_t value is a simple computation from the TID. */
const clockid_t tidclock = MAKE_THREAD_CPUCLOCK (pd->tid, CPUCLOCK_SCHED);
-# if !(__ASSUME_POSIX_CPU_TIMERS > 0)
- if (!__libc_missing_posix_cpu_timers)
- {
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_SYSCALL (clock_getres, err, 2, tidclock, NULL);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
-# endif
- {
- *clockid = tidclock;
- return 0;
- }
-
-# if !(__ASSUME_POSIX_CPU_TIMERS > 0)
- if (INTERNAL_SYSCALL_ERRNO (r, err) == EINVAL)
- {
- /* The kernel doesn't support these clocks at all. */
- __libc_missing_posix_cpu_timers = 1;
- }
- else
- return INTERNAL_SYSCALL_ERRNO (r, err);
- }
-# endif
-#endif
-
-#ifdef CLOCK_THREAD_CPUTIME_ID
- /* We need to store the thread ID in the CLOCKID variable together
- with a number identifying the clock. We reserve the low 3 bits
- for the clock ID and the rest for the thread ID. This is
- problematic if the thread ID is too large. But 29 bits should be
- fine.
-
- If some day more clock IDs are needed the ID part can be
- enlarged. The IDs are entirely internal. */
- if (pd->tid >= 1 << (8 * sizeof (*clockid) - CLOCK_IDFIELD_SIZE))
- return ERANGE;
-
- /* Store the number. */
- *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE);
-
+ *clockid = tidclock;
return 0;
-#else
- /* We don't have a timer for that. */
- return ENOENT;
-#endif
}
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_getcpuclockid.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_getcpuclockid.c Sun Sep 2 00:01:42 2012
@@ -29,60 +29,24 @@
int
clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
{
-#ifdef __NR_clock_getres
/* The clockid_t value is a simple computation from the PID.
But we do a clock_getres call to validate it. */
const clockid_t pidclock = MAKE_PROCESS_CPUCLOCK (pid, CPUCLOCK_SCHED);
-# if !(__ASSUME_POSIX_CPU_TIMERS > 0)
- extern int __libc_missing_posix_cpu_timers attribute_hidden;
- if (!__libc_missing_posix_cpu_timers)
-# endif
+ INTERNAL_SYSCALL_DECL (err);
+ int r = INTERNAL_SYSCALL (clock_getres, err, 2, pidclock, NULL);
+ if (!INTERNAL_SYSCALL_ERROR_P (r, err))
{
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_SYSCALL (clock_getres, err, 2, pidclock, NULL);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- {
- *clock_id = pidclock;
- return 0;
- }
-
- if (INTERNAL_SYSCALL_ERRNO (r, err) == EINVAL)
- {
-# if !(__ASSUME_POSIX_CPU_TIMERS > 0)
- if (pidclock == MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED)
- || INTERNAL_SYSCALL_ERROR_P (INTERNAL_SYSCALL
- (clock_getres, err, 2,
- MAKE_PROCESS_CPUCLOCK
- (0, CPUCLOCK_SCHED), NULL),
- err))
- /* The kernel doesn't support these clocks at all. */
- __libc_missing_posix_cpu_timers = 1;
- else
-# endif
- /* The clock_getres system call checked the PID for us. */
- return ESRCH;
- }
- else
- return INTERNAL_SYSCALL_ERRNO (r, err);
- }
-#endif
-
- /* We don't allow any process ID but our own. */
- if (pid != 0 && pid != getpid ())
- return EPERM;
-
-#ifdef CLOCK_PROCESS_CPUTIME_ID
- if (HAS_CPUCLOCK)
- {
- /* Store the number. */
- *clock_id = CLOCK_PROCESS_CPUTIME_ID;
-
+ *clock_id = pidclock;
return 0;
}
-#endif
- /* We don't have a timer for that. */
- return ENOENT;
+ if (INTERNAL_SYSCALL_ERRNO (r, err) == EINVAL)
+ {
+ /* The clock_getres system call checked the PID for us. */
+ return ESRCH;
+ }
+ else
+ return INTERNAL_SYSCALL_ERRNO (r, err);
}
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_getres.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_getres.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_getres.c Sun Sep 2 00:01:42 2012
@@ -46,89 +46,11 @@
case CLOCK_MONOTONIC_COARSE: \
SYSCALL_GETRES
-#ifdef __NR_clock_getres
/* We handled the REALTIME clock here. */
-# define HANDLED_REALTIME 1
-# define HANDLED_CPUTIME 1
+#define HANDLED_REALTIME 1
+#define HANDLED_CPUTIME 1
-# if __ASSUME_POSIX_CPU_TIMERS > 0
-
-# define SYSDEP_GETRES_CPU SYSCALL_GETRES
-# define SYSDEP_GETRES_CPUTIME /* Default catches them too. */
-
-# else
-
-extern int __libc_missing_posix_cpu_timers attribute_hidden;
-
-static int
-maybe_syscall_getres_cpu (clockid_t clock_id, struct timespec *res)
-{
- int e = EINVAL;
-
- if (!__libc_missing_posix_cpu_timers)
- {
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_VSYSCALL (clock_getres, err, 2, clock_id, res);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- return 0;
-
- e = INTERNAL_SYSCALL_ERRNO (r, err);
- if (e == EINVAL)
- {
- /* Check whether the kernel supports CPU clocks at all.
- If not, record it for the future. */
- r = INTERNAL_VSYSCALL (clock_getres, err, 2,
- MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
- NULL);
- if (INTERNAL_SYSCALL_ERROR_P (r, err))
- __libc_missing_posix_cpu_timers = 1;
- }
- }
-
- return e;
-}
-
-# define SYSDEP_GETRES_CPU \
- retval = maybe_syscall_getres_cpu (clock_id, res); \
- if (retval == 0) \
- break; \
- if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \
- { \
- __set_errno (retval); \
- retval = -1; \
- break; \
- } \
- retval = -1 /* Otherwise continue on to the HP_TIMING version. */;
-
-static inline int
-maybe_syscall_getres_cputime (clockid_t clock_id, struct timespec *res)
-{
- return maybe_syscall_getres_cpu
- (clock_id == CLOCK_THREAD_CPUTIME_ID
- ? MAKE_THREAD_CPUCLOCK (0, CPUCLOCK_SCHED)
- : MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
- res);
-}
-
-# define SYSDEP_GETRES_CPUTIME \
- case CLOCK_PROCESS_CPUTIME_ID: \
- case CLOCK_THREAD_CPUTIME_ID: \
- retval = maybe_syscall_getres_cputime (clock_id, res); \
- if (retval == 0) \
- break; \
- if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \
- { \
- __set_errno (retval); \
- retval = -1; \
- break; \
- } \
- retval = hp_timing_getres (res); \
- break;
-# if !HP_TIMING_AVAIL
-# define hp_timing_getres(res) (__set_errno (EINVAL), -1)
-# endif
-
-# endif
-#endif
+#define SYSDEP_GETRES_CPU SYSCALL_GETRES
+#define SYSDEP_GETRES_CPUTIME /* Default catches them too. */
#include <sysdeps/posix/clock_getres.c>
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_gettime.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_gettime.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_gettime.c Sun Sep 2 00:01:42 2012
@@ -49,99 +49,13 @@
retval = SYSCALL_GETTIME (clock_id, tp); \
break
-#ifdef __NR_clock_gettime
/* We handled the REALTIME clock here. */
-# define HANDLED_REALTIME 1
-# define HANDLED_CPUTIME 1
+#define HANDLED_REALTIME 1
+#define HANDLED_CPUTIME 1
-# if __ASSUME_POSIX_CPU_TIMERS > 0
-
-# define SYSDEP_GETTIME_CPU(clock_id, tp) \
+#define SYSDEP_GETTIME_CPU(clock_id, tp) \
retval = SYSCALL_GETTIME (clock_id, tp); \
break
-# define SYSDEP_GETTIME_CPUTIME /* Default catches them too. */
-
-# else
-
-int __libc_missing_posix_cpu_timers attribute_hidden;
-
-static int
-maybe_syscall_gettime_cpu (clockid_t clock_id, struct timespec *tp)
-{
- int e = EINVAL;
-
- if (!__libc_missing_posix_cpu_timers)
- {
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_GETTIME (clock_id, tp);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- return 0;
-
- e = INTERNAL_SYSCALL_ERRNO (r, err);
- if (e == EINVAL)
- {
-# ifdef HAVE_CLOCK_GETRES_VSYSCALL
- /* Check whether the kernel supports CPU clocks at all.
- If not, record it for the future. */
- 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),
- NULL);
-# endif
- if (INTERNAL_SYSCALL_ERROR_P (r, err))
- __libc_missing_posix_cpu_timers = 1;
- }
- }
-
- return e;
-}
-
-# define SYSDEP_GETTIME_CPU(clock_id, tp) \
- retval = maybe_syscall_gettime_cpu (clock_id, tp); \
- if (retval == 0) \
- break; \
- if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \
- { \
- __set_errno (retval); \
- retval = -1; \
- break; \
- } \
- retval = -1 /* Otherwise continue on to the HP_TIMING version. */;
-
-static inline int
-maybe_syscall_gettime_cputime (clockid_t clock_id, struct timespec *tp)
-{
- return maybe_syscall_gettime_cpu
- (clock_id == CLOCK_THREAD_CPUTIME_ID
- ? MAKE_THREAD_CPUCLOCK (0, CPUCLOCK_SCHED)
- : MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
- tp);
-}
-
-# define SYSDEP_GETTIME_CPUTIME \
- case CLOCK_PROCESS_CPUTIME_ID: \
- case CLOCK_THREAD_CPUTIME_ID: \
- retval = maybe_syscall_gettime_cputime (clock_id, tp); \
- if (retval == 0) \
- break; \
- if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \
- { \
- __set_errno (retval); \
- retval = -1; \
- break; \
- } \
- retval = hp_timing_gettime (clock_id, tp); \
- break
-# if !HP_TIMING_AVAIL
-# define hp_timing_gettime(clock_id, tp) (__set_errno (EINVAL), -1)
-# endif
-
-# endif
-#endif
+#define SYSDEP_GETTIME_CPUTIME /* Default catches them too. */
#include <sysdeps/unix/clock_gettime.c>
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_settime.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_settime.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/clock_settime.c Sun Sep 2 00:01:42 2012
@@ -31,38 +31,6 @@
# include <bits/libc-vdso.h>
#endif
-#if __ASSUME_POSIX_CPU_TIMERS <= 0 && defined __NR_clock_settime
-extern int __libc_missing_posix_cpu_timers attribute_hidden;
-
-static int
-maybe_syscall_settime_cpu (clockid_t clock_id, const struct timespec *tp)
-{
- int e = EINVAL;
-
- if (!__libc_missing_posix_cpu_timers)
- {
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_SYSCALL (clock_settime, err, 2, clock_id, tp);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- return 0;
-
- e = INTERNAL_SYSCALL_ERRNO (r, err);
- if (e == EINVAL)
- {
- /* Check whether the kernel supports CPU clocks at all.
- If not, record it for the future. */
- r = INTERNAL_VSYSCALL (clock_getres, err, 2,
- MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
- NULL);
- if (INTERNAL_SYSCALL_ERROR_P (r, err))
- __libc_missing_posix_cpu_timers = 1;
- }
- }
-
- return e;
-}
-#endif
-
/* The REALTIME clock is definitely supported in the kernel. */
#define SYSDEP_SETTIME \
@@ -70,27 +38,11 @@
retval = INLINE_SYSCALL (clock_settime, 2, clock_id, tp); \
break
-#ifdef __NR_clock_settime
/* We handled the REALTIME clock here. */
-# define HANDLED_REALTIME 1
-#endif
+#define HANDLED_REALTIME 1
-#if __ASSUME_POSIX_CPU_TIMERS > 0
-# define HANDLED_CPUTIME 1
-# define SYSDEP_SETTIME_CPU \
+#define HANDLED_CPUTIME 1
+#define SYSDEP_SETTIME_CPU \
retval = INLINE_SYSCALL (clock_settime, 2, clock_id, tp)
-#elif defined __NR_clock_settime
-# define SYSDEP_SETTIME_CPU \
- retval = maybe_syscall_settime_cpu (clock_id, tp); \
- if (retval == 0) \
- break; \
- if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \
- { \
- __set_errno (retval); \
- retval = -1; \
- break; \
- } \
- do { } while (0)
-#endif
#include <sysdeps/unix/clock_settime.c>
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h Sun Sep 2 00:01:42 2012
@@ -56,9 +56,6 @@
/* The getdents64 syscall was introduced in 2.4.0-test7 (but later for
MIPS n32). */
#define __ASSUME_GETDENTS64_SYSCALL 1
-
-/* Beginning with 2.6.12 the clock and timer supports CPU clocks. */
-#define __ASSUME_POSIX_CPU_TIMERS 1
/* The statfs64 syscalls are available in 2.5.74 (but not for alpha). */
#define __ASSUME_STATFS64 1
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits