D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7333 - interfaceToC should mention __gshared
Summary: interfaceToC should mention __gshared
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-20 22:11 UTC by Jonathan M Davis
Modified: 2015-06-09 05:15 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jonathan M Davis 2012-01-20 22:11:15 UTC
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 Walter Bright 2012-01-21 01:30:40 UTC
It does now.