[pypy-commit] stmgc c7: minor changes

Remi Meier noreply at buildbot.pypy.org
Fri Jan 31 16:32:08 CET 2014


Author: Remi Meier
Branch: c7
Changeset: r699:d3750e653c90
Date: 2014-01-31 16:05 +0100
http://bitbucket.org/pypy/stmgc/changeset/d3750e653c90/

Log:	minor changes

diff --git a/c7/core.h b/c7/core.h
--- a/c7/core.h
+++ b/c7/core.h
@@ -211,7 +211,7 @@
 extern size_t stmcb_size(struct object_s *);
 extern void stmcb_trace(struct object_s *, void (object_t **));
 
-void _stm_restore_local_state(int thread_num);
+char* _stm_restore_local_state(int thread_num);
 void stm_teardown(void);
 void stm_teardown_pthread(void);
 bool _stm_is_in_transaction(void);
diff --git a/c7/stmsync.c b/c7/stmsync.c
--- a/c7/stmsync.c
+++ b/c7/stmsync.c
@@ -43,11 +43,11 @@
 }
 
 
-void _stm_restore_local_state(int thread_num)
+char* _stm_restore_local_state(int thread_num)
 {
     if (thread_num == -1) {     /* mostly for debugging */
         set_gs_register(INVALID_GS_VALUE);
-        return;
+        return (char*)1;
     }
     
     char *thread_base = get_thread_base(thread_num);
@@ -55,6 +55,7 @@
 
     assert(_STM_TL->thread_num == thread_num);
     assert(_STM_TL->thread_base == thread_base);
+    return thread_base;
 }
 
 
@@ -66,7 +67,7 @@
     static_threads[_STM_TL->thread_num] = 0;
     sem_post(&static_thread_semaphore);
     
-    _stm_restore_local_state(-1); /* invalid */
+    assert(_stm_restore_local_state(-1)); /* invalid */
 }
 
 void _stm_grab_thread_segment()


More information about the pypy-commit mailing list