* [PATCH] Fix ppc64 NPTL compilation
@ 2004-10-05 15:33 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2004-10-05 15:33 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
Hi!
__timer_signal_thread_pclk declaration is now guarded with
#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
but #ifdef CLOCK_PROCESS_CPUTIME_ID is true on wider subset
of architectures.
I think
#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
implies
#ifdef CLOCK_PROCESS_CPUTIME_ID
so the following patch should DTRT.
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.
--- libc/nptl/sysdeps/pthread/timer_create.c.jj 2004-10-05 09:04:47.000000000 +0200
+++ libc/nptl/sysdeps/pthread/timer_create.c 2004-10-05 17:04:53.536976849 +0200
@@ -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;
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-05 15:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-05 15:33 [PATCH] Fix ppc64 NPTL compilation Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).