[pypy-commit] stmgc default: c8: do previous fix in the right way
Raemi
noreply at buildbot.pypy.org
Wed Feb 25 22:34:43 CET 2015
Author: Remi Meier <remi.meier at gmail.com>
Branch:
Changeset: r1666:1f9775627691
Date: 2015-02-25 18:12 +0100
http://bitbucket.org/pypy/stmgc/changeset/1f9775627691/
Log: c8: do previous fix in the right way
diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -873,8 +873,7 @@
void stm_commit_transaction(void)
{
- major_collection_if_requested();
- //exec_local_finalizers(); done by ^^^
+ exec_local_finalizers();
assert(!_has_mutex());
assert(STM_PSEGMENT->safe_point == SP_RUNNING);
@@ -897,6 +896,15 @@
stm_rewind_jmp_forget(STM_SEGMENT->running_thread);
+ /* if a major collection is required, do it here */
+ if (is_major_collection_requested()) {
+ synchronize_all_threads(STOP_OTHERS_UNTIL_MUTEX_UNLOCK);
+
+ if (is_major_collection_requested()) { /* if *still* true */
+ major_collection_now_at_safe_point();
+ }
+ }
+
commit_finalizers();
invoke_and_clear_user_callbacks(0); /* for commit */
More information about the pypy-commit
mailing list