فهرست منبع

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
Eric Andersen 23 سال پیش
والد
کامیت
cfcad9c1b1
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      libpthread/linuxthreads/pthread.c

+ 3 - 0
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)