Author: Remi Meier <remi.me...@inf.ethz.ch> Branch: Changeset: r1307:d70bdefc4757 Date: 2014-08-12 18:22 +0200 http://bitbucket.org/pypy/stmgc/changeset/d70bdefc4757/
Log: fix diff --git a/c7/demo/demo_random2.c b/c7/demo/demo_random2.c --- a/c7/demo/demo_random2.c +++ b/c7/demo/demo_random2.c @@ -135,14 +135,15 @@ return to_push; } +void add_root(objptr_t r); void pop_roots(long to_pop) { int i; for (i = 0; i < to_pop; i++) { - STM_POP_ROOT(stm_thread_local, td.active_roots_set[i]); + objptr_t t; + STM_POP_ROOT(stm_thread_local, t); + add_root(t); td.roots_on_ss--; - td.active_roots_num++; - assert(td.active_roots_num < ACTIVE_ROOTS_SET_SIZE); } } @@ -297,9 +298,9 @@ stm_commit_transaction(); td.roots_on_ss_at_tr_start = td.roots_on_ss; - /* if (get_rand(100) < 98) { */ - /* stm_start_transaction(&stm_thread_local); */ - /* } else */{ + if (get_rand(100) < 98) { + stm_start_transaction(&stm_thread_local); + } else{ stm_start_inevitable_transaction(&stm_thread_local); } td.roots_on_ss = td.roots_on_ss_at_tr_start; _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit