[pypy-commit] stmgc c7-refactor: in-progress

arigo noreply at buildbot.pypy.org
Sun Feb 9 18:31:31 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: c7-refactor
Changeset: r716:e6463fbbe6f9
Date: 2014-02-09 18:27 +0100
http://bitbucket.org/pypy/stmgc/changeset/e6463fbbe6f9/

Log:	in-progress

diff --git a/c7/stm/setup.c b/c7/stm/setup.c
--- a/c7/stm/setup.c
+++ b/c7/stm/setup.c
@@ -84,3 +84,7 @@
     }
 #endif
 }
+
+void stm_teardown(void)
+{
+}
diff --git a/c7/test/support.py b/c7/test/support.py
--- a/c7/test/support.py
+++ b/c7/test/support.py
@@ -40,6 +40,7 @@
 object_t *stm_allocate_prebuilt(ssize_t size_rounded_up);
 
 void stm_setup(void);
+void stm_teardown(void);
 
 bool _checked_stm_write(object_t *obj);
 bool _stm_was_read(object_t *obj);
@@ -48,7 +49,6 @@
 
 
 TEMPORARILY_DISABLED = """
-void stm_teardown(void);
 void stm_register_thread_local(stm_thread_local_t *tl);
 void stm_unregister_thread_local(stm_thread_local_t *tl);
 
@@ -399,26 +399,26 @@
 
     def setup_method(self, meth):
         lib.stm_setup()
-        lib.stm_setup_thread()
-        lib.stm_setup_thread()
-        lib._stm_restore_local_state(0)
-        self.current_thread = 0
+##        lib.stm_setup_thread()
+##        lib.stm_setup_thread()
+##        lib._stm_restore_local_state(0)
+##        self.current_thread = 0
 
     def teardown_method(self, meth):
-        if self.current_thread != 1:
-            self.switch(1)
-        if lib._stm_is_in_transaction():
-            stm_stop_transaction()
+##        if self.current_thread != 1:
+##            self.switch(1)
+##        if lib._stm_is_in_transaction():
+##            stm_stop_transaction()
 
-        self.switch(0)
-        if lib._stm_is_in_transaction():
-            stm_stop_transaction()
+##        self.switch(0)
+##        if lib._stm_is_in_transaction():
+##            stm_stop_transaction()
 
-        lib._stm_restore_local_state(1)
-        lib._stm_teardown_thread()
-        lib._stm_restore_local_state(0)
-        lib._stm_teardown_thread()
-        lib._stm_teardown()
+##        lib._stm_restore_local_state(1)
+##        lib._stm_teardown_thread()
+##        lib._stm_restore_local_state(0)
+##        lib._stm_teardown_thread()
+        lib.stm_teardown()
 
     def switch(self, thread_num):
         assert thread_num != self.current_thread


More information about the pypy-commit mailing list