[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: _cthread_init_routine and _cthread_exit_routine
From: |
Neal H. Walfield |
Subject: |
Re: _cthread_init_routine and _cthread_exit_routine |
Date: |
Thu, 05 May 2005 07:16:19 +0100 |
User-agent: |
Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At Wed, 4 May 2005 15:12:34 -0700 (PDT),
Roland McGrath wrote:
>
> > At Wed, 4 May 2005 14:07:41 -0700 (PDT),
> > Roland McGrath wrote:
> > >
> > > There isn't any big issue with _cthread_exit_routine, because it doesn't
> > > need to be set so early. Your initializer code (DSO initializer, or your
> > > _cthread_init_routine function) can just assign _cthread_exit_routine.
> > >
> >
> > Good point. Does that mean glibc should be to actually call
> > _cthread_exit_initializer? Should I file a bug report?
>
> Huh? I just described why no further libc change is required.
In my second email, I asked two questions: 1) does the same treatment
that you have suggested need to be applied to _cthread_exit_routine
and 2) _cthread_exit_routine is never called should we fix it. As I
understood your reply, you responded to the first but said nothing
with respect to the second. Basically,
[a]s far as I can tell, _cthread_exit_routine is not currently called
when the main thread exits as libc/sysdeps/mach/start.c would seem
to suggest: we use libc/sysdeps/generic/libc-start.c (which is
called by libc/sysdeps/i386/elf/start.S) to call main. This isn't a
problem for libpthread as libpthread doesn't use this call back.
libcthreads, on the other hand, does to wait until all other threads
have exited.
Thanks,
Neal
Re: libpthread not loading indirectly?, Michael Banck, 2005/05/17