Author: Remi Meier <[email protected]>
Branch: stmgc-c4
Changeset: r68690:756ea867e0d1
Date: 2014-01-15 21:48 +0100
http://bitbucket.org/pypy/pypy/changeset/756ea867e0d1/

Log:    completeness

diff --git a/rpython/rlib/rstm.py b/rpython/rlib/rstm.py
--- a/rpython/rlib/rstm.py
+++ b/rpython/rlib/rstm.py
@@ -95,6 +95,7 @@
 @dont_look_inside
 def before_external_call():
     if we_are_translated():
+        # this tries to commit, or becomes inevitable if atomic
         llop.stm_commit_transaction(lltype.Void)
 before_external_call._dont_reach_me_in_del_ = True
 before_external_call._transaction_break_ = True
@@ -102,6 +103,7 @@
 @dont_look_inside
 def after_external_call():
     if we_are_translated():
+        # starts a new transaction if we are not atomic already
         llop.stm_begin_inevitable_transaction(lltype.Void)
 after_external_call._dont_reach_me_in_del_ = True
 after_external_call._transaction_break_ = True
diff --git a/rpython/translator/stm/breakfinder.py 
b/rpython/translator/stm/breakfinder.py
--- a/rpython/translator/stm/breakfinder.py
+++ b/rpython/translator/stm/breakfinder.py
@@ -8,6 +8,8 @@
     'stm_partial_commit_and_resume_other_threads', # new priv_revision
     'jit_assembler_call',
     'jit_stm_transaction_break_point',
+    'stm_enter_callback_call',
+    'stm_leave_callback_call',
     ])
 
 
diff --git a/rpython/translator/stm/test/test_jitdriver.py 
b/rpython/translator/stm/test/test_jitdriver.py
--- a/rpython/translator/stm/test/test_jitdriver.py
+++ b/rpython/translator/stm/test/test_jitdriver.py
@@ -44,11 +44,15 @@
         class X:
             counter = 10
         x = X()
-        myjitdriver = JitDriver(greens=[], reds=[])
+        myjitdriver = JitDriver(greens=[], reds=[],
+                                stm_do_transaction_breaks=True)
 
         def f1():
             while x.counter > 0:
                 myjitdriver.jit_merge_point()
+                if rstm.jit_stm_should_break_transaction(False):
+                    rstm.jit_stm_transaction_break_point()
+
                 x.counter -= 1
 
         res = self.interpret(f1, [])
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to