[Issue 5485] TLS sections handled incorrectly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 25 19:01:58 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5485


Brad Roberts <braddr at puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |braddr at puremagic.com
         Resolution|INVALID                     |


--- Comment #2 from Brad Roberts <braddr at puremagic.com> 2011-01-25 18:59:51 PST ---
So, the obvious follow up here is that the existing __thread parts from the
other _tlsstart and _tlsend declarations should be yanked as pointless:

diff --git a/src/core/thread.d b/src/core/thread.d
index a317306..911efb3 100644
--- a/src/core/thread.d
+++ b/src/core/thread.d
@@ -130,8 +130,8 @@ version( Windows )
             //       these are defined in dm\src\win32\tlsseg.asm by DMC.
             extern (C)
             {
-                extern __thread int _tlsstart;
-                extern __thread int _tlsend;
+                extern int _tlsstart;
+                extern int _tlsend;
             }
         }
         else
@@ -251,8 +251,8 @@ else version( Posix )
             {
                 extern (C)
                 {
-                    extern __thread int _tlsstart;
-                    extern __thread int _tlsend;
+                    extern int _tlsstart;
+                    extern int _tlsend;
                 }
             }
             else version( OSX )

Also, how about the int vs void* difference?  From the look of the usage
pattern, it probably doesn't matter, but it does stand out as a difference.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list