about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog7
-rw-r--r--nptl/sysdeps/pthread/timer_create.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 6e0cdc6d63..62d476296e 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,5 +1,12 @@
 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
 
+	* sysdeps/pthread/timer_create.c (timer_create): Use
+	defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
+	defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
+	THREAD_CPUTIME.
+
+2004-10-05  Jakub Jelinek  <jakub@redhat.com>
+
 	* sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
 	_POSIX_THREAD_CPUTIME): Define to 0.
 
diff --git a/nptl/sysdeps/pthread/timer_create.c b/nptl/sysdeps/pthread/timer_create.c
index 57dd39e81b..2f5a587e8d 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 CLOCK_PROCESS_CPUTIME_ID
+#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
       || clock_id == CLOCK_PROCESS_CPUTIME_ID
 #endif
-#ifdef CLOCK_THREAD_CPUTIME_ID
+#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0
       || 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 CLOCK_PROCESS_CPUTIME_ID
+#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
 	case CLOCK_PROCESS_CPUTIME_ID:
 	  thread = &__timer_signal_thread_pclk;
 	  break;
 #endif
-#ifdef CLOCK_THREAD_CPUTIME_ID
+#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0
 	case CLOCK_THREAD_CPUTIME_ID:
 	  thread = &__timer_signal_thread_tclk;
 	  break;