about summary refs log tree commit diff
path: root/nptl/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-04 20:51:25 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-04 20:51:25 +0000
commite4bb48539fa1012f4ec102d8a3b12e846a832ff5 (patch)
treecb3253bca5732755b5f68dd9fc47417d1c1edda6 /nptl/sysdeps
parent94d824f920209243c72eb4a6fedbb5a039be2af3 (diff)
downloadglibc-e4bb48539fa1012f4ec102d8a3b12e846a832ff5.tar.gz
glibc-e4bb48539fa1012f4ec102d8a3b12e846a832ff5.tar.xz
glibc-e4bb48539fa1012f4ec102d8a3b12e846a832ff5.zip
Update.
2004-10-04  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
	and _POSIX_THREAD_CPUTIME to zero.
	* sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
	* tst-barrier2.c: Fix testing for POSIX feature.
	* tst-clock1.c: Likewise.
	* tst-clock2.c: Likewise.
	* tst-cond11.c: Likewise.
	* tst-cond4.c: Likewise.
	* tst-cond6.c: Likewise.
	* tst-flock2.c: Likewise.
	* tst-mutex4.c: Likewise.
	* tst-mutex9.c: Likewise.
	* tst-rwlock12.c: Likewise.
	* tst-rwlock4.c: Likewise.
	* tst-signal1.c: Likewise.
	* tst-spin2.c: Likewise.
	* sysdeps/pthread/posix-timer.h: Likewise.
	* sysdeps/pthread/timer_create.c: Likewise.
	* sysdeps/pthread/timer_routines.c: Likewise.
Diffstat (limited to 'nptl/sysdeps')
-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
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h4
5 files changed, 17 insertions, 17 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
 
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
index 7563de8ad2..2b5a3e6db8 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
@@ -103,10 +103,10 @@
 #define _POSIX_SHARED_MEMORY_OBJECTS	200112L
 
 /* CPU-time clocks supported.  */
-#define _POSIX_CPUTIME 200112L
+#define _POSIX_CPUTIME 0
 
 /* We support the clock also in threads.  */
-#define _POSIX_THREAD_CPUTIME  200112L
+#define _POSIX_THREAD_CPUTIME  0
 
 /* GNU libc provides regular expression handling.  */
 #define _POSIX_REGEXP	1
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
index 7563de8ad2..2b5a3e6db8 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
@@ -103,10 +103,10 @@
 #define _POSIX_SHARED_MEMORY_OBJECTS	200112L
 
 /* CPU-time clocks supported.  */
-#define _POSIX_CPUTIME 200112L
+#define _POSIX_CPUTIME 0
 
 /* We support the clock also in threads.  */
-#define _POSIX_THREAD_CPUTIME  200112L
+#define _POSIX_THREAD_CPUTIME  0
 
 /* GNU libc provides regular expression handling.  */
 #define _POSIX_REGEXP	1