This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: conditional use of __thread
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Arnaud Charlet <charlet at ACT-Europe dot FR>, gcc at gcc dot gnu dot org
- Date: 25 Jul 2004 16:43:24 +0200
- Subject: Re: conditional use of __thread
- Organization: Integrable Solutions
- References: <20040725114100.A28346@dublin.act-europe.fr><874qnwjgql.fsf@codesourcery.com>
Zack Weinberg <zack@codesourcery.com> writes:
| Arnaud Charlet <charlet@ACT-Europe.FR> writes:
|
| > In a GNAT C run time file, I'd like to make use of the __thread keyword
| > when it is supported by GCC.
| >
| > So far, I couldn't find a way (macro ?) to know in a run time (non
| > compiler) file whether __thread was supported or not.
| >
| > Is there such a way ?
|
| Doesn't look like it at present.
|
| > If not, what would be a reasonable way to add this info ?
|
| Add something like
|
| if (targetm.have_tls)
| cpp_define (pfile, "__TLS__");
|
| to c-cppbuiltin.c::c_cpp_builtins; document the new feature in
| cpp.texi (Common Predefined Macros section).
|
| I'm not sure __TLS__ is the best name for this macro. Anyone have a
| suggestion?
I would suggest it be put in a GCC name space, say, __GCC_TLS__
-- Gaby