Re: Thread-safe resolver [patches for review]
Maxim Sobolev <[email protected]> Mon, 19 Aug 2002 20:26:12 +0300
| Newsgroups | gmane.os.freebsd.devel.audit |
|---|---|
| Organization | Vega International Capital |
| Message-ID | <[email protected]> |
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-audit" in the body of the message