On 2013-01-09 11:38, Walter Bright wrote:

Watcha do is something like this:

__thread int x;
int foo() { return x; }

Compile, disassemble, and look at the code generated and the fixup
records. Then there's no need to guess :-)

Sure, I've already done that. I compared one version using "__thread" and one version without "__thread". I do see the differences of the disassembly but that doesn't help me, I don't know assembly. The only interesting I could find is that it does perform a "call", the version with "__thread".

I don't have access to a machine running Lion+ but you could take a look at this:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52268

That's a bugzilla issue for the same thing for GCC. The comments contain some disassembly of uses of "__thread".

--
/Jacob Carlborg

Reply via email to