summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/pthread.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-01-30 17:19:22 +0000
committerEric Andersen <andersen@codepoet.org>2003-01-30 17:19:22 +0000
commitcfcad9c1b1a3cb4daed1c15bfa000a619db95768 (patch)
tree31d81e27869419361e1b1233dbecc39f7a1903b7 /libpthread/linuxthreads/pthread.c
parentb26ab3f5bf69b2c00a34e240bca681904144e33d (diff)
Patch from Christian Krause:
I found a problem in uClibc in libpthread/linuxthres/condvar.c: pthread_cond_timedwait never uses rt singals uClibc has two implementations of pthread_cond_timewait - pthread_cond_timedwait_relative_old using the "normal" signals and pthread_cond_timedwait_relative_new usign the rt signals (for kernels >= 2.2). The function pointer pthread_cond_tw_rel is initialised with the old function. In "__pthread_init_condvar(int)" this pointer is set to the new function using rt signals, but "__pthread_init_condvar" is never called in the uClibc. The following patch solves this issue, so that __pthread_init_condvars is called and the function pointer is always initialised with the correct function. regards, christian
Diffstat (limited to 'libpthread/linuxthreads/pthread.c')
-rw-r--r--libpthread/linuxthreads/pthread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c
index 42127d03e..12ee2fd98 100644
--- a/libpthread/linuxthreads/pthread.c
+++ b/libpthread/linuxthreads/pthread.c
@@ -337,6 +337,9 @@ PDEBUG("block mask = %x\n", mask);
/* Do it early so that user-registered atexit functions are called
before pthread_exit_process. */
on_exit(pthread_exit_process, NULL);
+#ifdef __NR_rt_sigaction
+ __pthread_init_condvar(1);
+#endif
}
void __pthread_initialize(void)