[pypy-commit] pypy stmgc-c7: import stmgc/6718bfcdc402

arigo noreply at buildbot.pypy.org
Tue Mar 11 10:41:59 CET 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r69854:0ba9edd00a2b
Date: 2014-03-11 10:28 +0100
http://bitbucket.org/pypy/pypy/changeset/0ba9edd00a2b/

Log:	import stmgc/6718bfcdc402

diff --git a/rpython/translator/stm/src_stm/revision b/rpython/translator/stm/src_stm/revision
--- a/rpython/translator/stm/src_stm/revision
+++ b/rpython/translator/stm/src_stm/revision
@@ -1,1 +1,1 @@
-d912ca6f0d53
+6718bfcdc402
diff --git a/rpython/translator/stm/src_stm/stm/extra.c b/rpython/translator/stm/src_stm/stm/extra.c
--- a/rpython/translator/stm/src_stm/stm/extra.c
+++ b/rpython/translator/stm/src_stm/stm/extra.c
@@ -4,9 +4,14 @@
 #endif
 
 
-void stm_call_on_abort(void *key, void callback(void *))
+void stm_call_on_abort(stm_thread_local_t *tl,
+                       void *key, void callback(void *))
 {
-    assert(_running_transaction());
+    if (!_stm_in_transaction(tl)) {
+        /* check that the current thread-local is really running a
+           transaction, and do nothing otherwise. */
+        return;
+    }
 
     if (STM_PSEGMENT->transaction_state == TS_INEVITABLE) {
         /* ignore callbacks if we're in an inevitable transaction
diff --git a/rpython/translator/stm/src_stm/stmgc.h b/rpython/translator/stm/src_stm/stmgc.h
--- a/rpython/translator/stm/src_stm/stmgc.h
+++ b/rpython/translator/stm/src_stm/stmgc.h
@@ -283,7 +283,7 @@
    can only register one callback per key.  You can call
    'stm_call_on_abort(key, NULL)' to cancel an existing callback.
    Note: 'key' must be aligned to a multiple of 8 bytes. */
-void stm_call_on_abort(void *key, void callback(void *));
+void stm_call_on_abort(stm_thread_local_t *, void *key, void callback(void *));
 
 
 /* ==================== END ==================== */


More information about the pypy-commit mailing list