summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/pthread
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-10-05 08:25:34 +0000
committerJakub Jelinek <jakub@redhat.com>2004-10-05 08:25:34 +0000
commitfd63f7c6ce353ccfdbba58a37e8ef5465fcedfe4 (patch)
treed68e6563180c849e8c5a37b646903b82c4302c1e /nptl/sysdeps/pthread
parent85148842d401edf64f9edee7e5819a947c289ed2 (diff)
Updated to fedora-glibc-20041005T0745
Diffstat (limited to 'nptl/sysdeps/pthread')
-rw-r--r--nptl/sysdeps/pthread/posix-timer.h6
-rw-r--r--nptl/sysdeps/pthread/timer_create.c8
-rw-r--r--nptl/sysdeps/pthread/timer_routines.c12
3 files changed, 13 insertions, 13 deletions
diff --git a/nptl/sysdeps/pthread/posix-timer.h b/nptl/sysdeps/pthread/posix-timer.h
index 948b1694c4..843e44711a 100644
--- a/nptl/sysdeps/pthread/posix-timer.h
+++ b/nptl/sysdeps/pthread/posix-timer.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX timer implementation on top of NPTL.
- Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
@@ -92,10 +92,10 @@ extern int __timer_init_failed;
/* A distinct thread is used for each clock type. */
extern struct thread_node __timer_signal_thread_rclk;
-#ifdef _POSIX_CPUTIME
+#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
extern struct thread_node __timer_signal_thread_pclk;
#endif
-#ifdef _POSIX_THREAD_CPUTIME
+#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0
extern struct thread_node __timer_signal_thread_tclk;
#endif
diff --git a/nptl/sysdeps/pthread/timer_create.c b/nptl/sysdeps/pthread/timer_create.c
index b74fafda62..57dd39e81b 100644
--- a/nptl/sysdeps/pthread/timer_create.c
+++ b/nptl/sysdeps/pthread/timer_create.c
@@ -38,10 +38,10 @@ timer_create (clock_id, evp, timerid)
struct thread_node *thread = NULL;
if (0
-#ifdef _POSIX_CPUTIME
+#ifdef CLOCK_PROCESS_CPUTIME_ID
|| clock_id == CLOCK_PROCESS_CPUTIME_ID
#endif
-#ifdef _POSIX_THREAD_CPUTIME
+#ifdef CLOCK_THREAD_CPUTIME_ID
|| clock_id == CLOCK_THREAD_CPUTIME_ID
#endif
)
@@ -100,12 +100,12 @@ timer_create (clock_id, evp, timerid)
default:
thread = &__timer_signal_thread_rclk;
break;
-#ifdef _POSIX_CPUTIME
+#ifdef CLOCK_PROCESS_CPUTIME_ID
case CLOCK_PROCESS_CPUTIME_ID:
thread = &__timer_signal_thread_pclk;
break;
#endif
-#ifdef _POSIX_THREAD_CPUTIME
+#ifdef CLOCK_THREAD_CPUTIME_ID
case CLOCK_THREAD_CPUTIME_ID:
thread = &__timer_signal_thread_tclk;
break;
diff --git a/nptl/sysdeps/pthread/timer_routines.c b/nptl/sysdeps/pthread/timer_routines.c
index 3ee8fef17b..caa93433e3 100644
--- a/nptl/sysdeps/pthread/timer_routines.c
+++ b/nptl/sysdeps/pthread/timer_routines.c
@@ -53,10 +53,10 @@ int __timer_init_failed;
/* Node for the thread used to deliver signals. */
struct thread_node __timer_signal_thread_rclk;
-#ifdef _POSIX_CPUTIME
+#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
struct thread_node __timer_signal_thread_pclk;
#endif
-#ifdef _POSIX_THREAD_CPUTIME
+#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0
struct thread_node __timer_signal_thread_tclk;
#endif
@@ -191,10 +191,10 @@ init_module (void)
list_append (&thread_free_list, &thread_array[i].links);
thread_init (&__timer_signal_thread_rclk, 0, CLOCK_REALTIME);
-#ifdef _POSIX_CPUTIME
+#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
thread_init (&__timer_signal_thread_pclk, 0, CLOCK_PROCESS_CPUTIME_ID);
#endif
-#ifdef _POSIX_THREAD_CPUTIME
+#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0
thread_init (&__timer_signal_thread_tclk, 0, CLOCK_THREAD_CPUTIME_ID);
#endif
}
@@ -281,10 +281,10 @@ thread_cleanup (void *val)
/* How did the signal thread get killed? */
assert (thread != &__timer_signal_thread_rclk);
-#ifdef _POSIX_CPUTIME
+#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
assert (thread != &__timer_signal_thread_pclk);
#endif
-#ifdef _POSIX_THREAD_CPUTIME
+#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0
assert (thread != &__timer_signal_thread_tclk);
#endif