[pypy-commit] stmgc c7-fork: Reset this state after fork too

arigo noreply at buildbot.pypy.org
Tue Mar 18 15:46:40 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: c7-fork
Changeset: r1071:2c4acbf96895
Date: 2014-03-18 15:46 +0100
http://bitbucket.org/pypy/stmgc/changeset/2c4acbf96895/

Log:	Reset this state after fork too

diff --git a/c7/stm/sync.c b/c7/stm/sync.c
--- a/c7/stm/sync.c
+++ b/c7/stm/sync.c
@@ -36,6 +36,10 @@
     char reserved[192];
 } sync_ctl __attribute__((aligned(64)));
 
+#ifndef NDEBUG
+static bool _safe_points_requested = false;
+#endif
+
 
 static void setup_sync(void)
 {
@@ -64,6 +68,10 @@
 static void teardown_sync_1(void)
 {
     memset(&sync_ctl, 0, sizeof(sync_ctl));
+#ifndef NDEBUG
+    _safe_points_requested = false;
+#endif
+    pause_signalled = false;
 }
 
 #ifndef NDEBUG
@@ -255,10 +263,6 @@
 /************************************************************/
 
 
-#ifndef NDEBUG
-static bool _safe_points_requested = false;
-#endif
-
 static void signal_everybody_to_pause_running(void)
 {
     assert(_safe_points_requested == false);


More information about the pypy-commit mailing list