Commits

Remi Meier  committed 756ea86

completeness

  • Participants
  • Parent commits f847692
  • Branches stmgc-c4

Comments (0)

Files changed (3)

File rpython/rlib/rstm.py

 @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
 @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

File rpython/translator/stm/breakfinder.py

     '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',
     ])
 
 

File rpython/translator/stm/test/test_jitdriver.py

         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, [])