Author: Armin Rigo <[email protected]>
Branch: c8-gil-like
Changeset: r1803:e414755a0ddc
Date: 2015-06-11 12:05 +0200
http://bitbucket.org/pypy/stmgc/changeset/e414755a0ddc/

Log:    fix test

diff --git a/c8/demo/demo_random.c b/c8/demo/demo_random.c
--- a/c8/demo/demo_random.c
+++ b/c8/demo/demo_random.c
@@ -367,7 +367,6 @@
 
             long call_fork = (arg != NULL && *(long *)arg);
             if (call_fork == 0) {   /* common case */
-                td.num_roots_at_transaction_start = td.num_roots;
                 if (get_rand(100) < 50) {
                     stm_leave_transactional_zone(&stm_thread_local);
                     /* Nothing here; it's unlikely that a different thread
@@ -376,10 +375,13 @@
                     fprintf(stderr, "sleep...\n");
                     usleep(1);
                     fprintf(stderr, "sleep done\n");
+                    td.num_roots_at_transaction_start = td.num_roots;
                     stm_enter_transactional_zone(&stm_thread_local);
                 }
                 else {
-                    stm_force_transaction_break(&stm_thread_local);
+                    _stm_commit_transaction();
+                    td.num_roots_at_transaction_start = td.num_roots;
+                    _stm_start_transaction(&stm_thread_local);
                 }
                 td.num_roots = td.num_roots_at_transaction_start;
                 p = NULL;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to