From: Roland Schwarz <roland.schwarz@chello.at>
To: Pthreads-Win32 list <pthreads-win32@sourceware.org>
Cc: Ross Johnson <Ross.Johnson@homemail.com.au>,
Ramiro Polla <ramiro@lisha.ufsc.br>
Subject: Re: Static libraries initialization
Date: Mon, 19 May 2008 11:29:00 -0000 [thread overview]
Message-ID: <48316487.7050403@chello.at> (raw)
In-Reply-To: <4811657E.40608@homemail.com.au>
Ross Johnson wrote:
> Now there is only the thread detach cleanup to deal with. I haven't
> found an equivalent to atexit() for win32 native threads. Is there one,
> or is there another way to make this automatic? The problem is as follows:-
Sorry for dropping in. I did not follow this list for a while, but the
above question triggered me.
While I was solving the cleanup problem for the boost TLS implementation
for static linking I came over a not so well known feature of the PE
file format:
The operating system calls into a hook on every detaching thread similar
to DllMain, but also for statically linked libs.
Withou going into detail: This is compiler dependent and has been made
working for MSVC and gcc compilers. Borland unfortunately cannot
be made to work. :-(
You might look for the details in the boost threading lib, or contact
me if you need more details.
Ah, yes not to forget to mention: credits for this idea go to Aaron La
Framboise.
Regards,
--
_________________________________________
_ _ | Roland Schwarz
|_)(_ | aka. speedsnail
| \__) | mailto:roland.schwarz@chello.at
________| http://www.blackspace.at
prev parent reply other threads:[~2008-05-19 11:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-24 12:53 Ramiro Polla
[not found] ` <4810ABB9.10106@homemail.com.au>
[not found] ` <4810D5C3.2070306@lisha.ufsc.br>
2008-04-25 5:01 ` Ross Johnson
2008-04-26 0:07 ` Ross Johnson
2008-05-19 11:29 ` Roland Schwarz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48316487.7050403@chello.at \
--to=roland.schwarz@chello.at \
--cc=Ross.Johnson@homemail.com.au \
--cc=pthreads-win32@sourceware.org \
--cc=ramiro@lisha.ufsc.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).