From cfcad9c1b1a3cb4daed1c15bfa000a619db95768 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 30 Jan 2003 17:19:22 +0000 Subject: 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 --- libpthread/linuxthreads/pthread.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libpthread/linuxthreads') 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) -- cgit v1.2.3