gdb and linuxthreads (A deadlock in linuxthreads.)

H.J. Lu hjl@lucon.org
Sun Dec 20 13:01:00 GMT 1998


> Index: pthread.c
> ===================================================================
> RCS file: /glibc/cvsfiles/libc/linuxthreads/pthread.c,v
> retrieving revision 1.12
> diff -c -r1.12 pthread.c
> *** pthread.c	1998/12/04 20:55:31	1.12
> --- pthread.c	1998/12/20 09:22:04
> ***************
> *** 510,516 ****
>   #endif
>   
>     if (self == &__pthread_manager_thread)
> !     return;
>     if (__pthread_exit_requested) {
>       /* Main thread should accumulate times for thread manager and its
>          children, so that timings for main thread account for all threads. */
> --- 505,511 ----
>   #endif
>   
>     if (self == &__pthread_manager_thread)
> !     __pthread_manager_sighandler(sig);
>     if (__pthread_exit_requested) {
>       /* Main thread should accumulate times for thread manager and its
>          children, so that timings for main thread account for all threads. */

Did you miss a return here? Should it be

    if (self == &__pthread_manager_thread) {
      __pthread_manager_sighandler(sig);
      return;
    }

Thanks.

-- 
H.J. Lu (hjl@gnu.org)



More information about the Libc-hacker mailing list