Author: Armin Rigo <[email protected]>
Branch: stm-gc
Changeset: r52314:de00dab5772e
Date: 2012-02-09 17:18 +0100
http://bitbucket.org/pypy/pypy/changeset/de00dab5772e/

Log:    Fixes

diff --git a/pypy/rpython/lltypesystem/rffi.py 
b/pypy/rpython/lltypesystem/rffi.py
--- a/pypy/rpython/lltypesystem/rffi.py
+++ b/pypy/rpython/lltypesystem/rffi.py
@@ -326,6 +326,7 @@
 aroundstate._freeze_()
 
 class StackCounter:
+    _alloc_flavor_ = "raw"
     def _freeze_(self):
         self.stacks_counter = 1     # number of "stack pieces": callbacks
         return False                # and threads increase it by one
diff --git a/pypy/translator/stm/src_stm/et.c b/pypy/translator/stm/src_stm/et.c
--- a/pypy/translator/stm/src_stm/et.c
+++ b/pypy/translator/stm/src_stm/et.c
@@ -682,7 +682,7 @@
      by another thread.  We set the lowest bit in global_timestamp
      to 1. */
   struct tx_descriptor *d = thread_descriptor;
-  if (is_main_thread(d))
+  if (d == NULL || is_main_thread(d))
     return;
 
 #ifdef RPY_STM_DEBUG_PRINT
@@ -696,7 +696,7 @@
 #  endif
 #endif
 
-  if (is_inevitable(d))
+  if (is_inevitable(d))   /* also when the transaction is inactive */
     {
 #ifdef RPY_STM_DEBUG_PRINT
       PYPY_DEBUG_STOP("stm-inevitable");
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to