Terry Lambert wrote:
>
> [...]
> > > The assumption (which is potentially wrong) is that the program
> > > will correctly shut down all its threads, when in fact it was a
> > > module not under the programs control that created and used the
> > > threads.
> >
> > I do not quite agree. In such case, the module should probably have
> > destructor function, either placed into the fini section, or to be
> > explicitly called by the program before dlclose().
>
> Uh, that's exactly the argument I was making: use a .fini section
> to clean up the per thread memory allocations.
> 8-).
I am not sure how you can get from a .fini section list of per-thread
dynamically allocated storages, without resorting to inspecting inner
implementation details of pthread_{set,get}specific(3). Any ideas?
-Maxim
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message