This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
thread-local storage (was: BAD NEWS - Apache ...)
- To: colin at bird dot fu dot is dot saga-u dot ac dot jp (Colin Peters)
- Subject: thread-local storage (was: BAD NEWS - Apache ...)
- From: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- Date: Sat, 17 May 1997 01:26:33 +1000 (EST)
- Cc: gnu-win32 at cygnus dot com (Cygnus GNU-win32 mailing list)
Colin Peters, you wrote:
>
> If GCC supported the __declspec(thread) syntax (or some equivalent)
> then you could simply mark all your thread local "static" or "global"
> variables with that and everything would be simpler, but I don't
> think that is likely to work now or anytime soon.
What would be necessary to get this to work?
Is
#define THREADLOCAL __attribute__((section(".tls")))
int foo THREADLOCAL = 42;
enough, or does the compiler need to generate special code for accessing
thread-local storage?
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".