[pypy-commit] pypy stm-gc: Only have EXCDATA be a thread-local if stm is enabled.

arigo noreply at buildbot.pypy.org
Mon Feb 20 14:18:53 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: stm-gc
Changeset: r52675:983cc177471a
Date: 2012-02-20 14:10 +0100
http://bitbucket.org/pypy/pypy/changeset/983cc177471a/

Log:	Only have EXCDATA be a thread-local if stm is enabled.

diff --git a/pypy/translator/c/node.py b/pypy/translator/c/node.py
--- a/pypy/translator/c/node.py
+++ b/pypy/translator/c/node.py
@@ -520,7 +520,9 @@
 
     def is_thread_local(self):
         T = self.getTYPE()
-        return hasattr(T, "_hints") and T._hints.get('thread_local')
+        return hasattr(T, "_hints") and (T._hints.get('thread_local') or (
+                  T._hints.get('stm_thread_local') and
+                  self.db.translator.config.translation.stm))
 
     def compilation_info(self):
         return getattr(self.obj, self.eci_name, None)
diff --git a/pypy/translator/exceptiontransform.py b/pypy/translator/exceptiontransform.py
--- a/pypy/translator/exceptiontransform.py
+++ b/pypy/translator/exceptiontransform.py
@@ -472,7 +472,7 @@
         EXCDATA = lltype.Struct('ExcData',
             ('exc_type',  self.lltype_of_exception_type),
             ('exc_value', self.lltype_of_exception_value),
-            hints={'thread_local': True})
+            hints={'stm_thread_local': True})
         self.EXCDATA = EXCDATA
 
         exc_data = lltype.malloc(EXCDATA, immortal=True)


More information about the pypy-commit mailing list