Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r1013:f0caf6780ab6
Date: 2014-03-14 14:51 +0100
http://bitbucket.org/pypy/stmgc/changeset/f0caf6780ab6/

Log:    Rename this function to make it clear that it's not giving a very
        reliable answer in case the real answer is No

diff --git a/c7/stm/core.c b/c7/stm/core.c
--- a/c7/stm/core.c
+++ b/c7/stm/core.c
@@ -11,7 +11,7 @@
 
 void _stm_write_slowpath(object_t *obj)
 {
-    assert(_running_transaction());
+    assert(_seems_to_be_running_transaction());
     assert(!_is_young(obj));
 
     /* is this an object from the same transaction, outside the nursery? */
diff --git a/c7/stm/core.h b/c7/stm/core.h
--- a/c7/stm/core.h
+++ b/c7/stm/core.h
@@ -204,7 +204,7 @@
 }
 
 static bool _is_tl_registered(stm_thread_local_t *tl);
-static bool _running_transaction(void);
+static bool _seems_to_be_running_transaction(void);
 
 static void teardown_core(void);
 static void abort_with_mutex(void) __attribute__((noreturn));
diff --git a/c7/stm/sync.c b/c7/stm/sync.c
--- a/c7/stm/sync.c
+++ b/c7/stm/sync.c
@@ -213,7 +213,7 @@
 }
 
 __attribute__((unused))
-static bool _running_transaction(void)
+static bool _seems_to_be_running_transaction(void)
 {
     return (STM_SEGMENT->running_thread != NULL);
 }
@@ -301,7 +301,7 @@
 
 static void enter_safe_point_if_requested(void)
 {
-    assert(_running_transaction());
+    assert(_seems_to_be_running_transaction());
     assert(_has_mutex());
     while (1) {
         if (must_abort())
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to