Bug 7333 – interfaceToC should mention __gshared

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-20T22:11:00Z
Last change time
2015-06-09T05:15:17Z
Assigned to
nobody
Creator
issues.dlang

Comments

Comment #0 by issues.dlang — 2012-01-20T22:11:15Z
If I'm not mistaken, C global variables should be marked with __gshared for them to work correctly, since without that, they're end up being thread-local per D's type system. http://dlang.org/interfaceToC.html does not mention __gshared at all. It should explain that __gshared should be used on C global variable declarations in order for them not be treated as thread-local by the compiler.
Comment #1 by bugzilla — 2012-01-21T01:30:40Z
It does now.