Author: Armin Rigo <[email protected]>
Branch:
Changeset: r897:40ba082e00e8
Date: 2014-02-27 18:36 +0100
http://bitbucket.org/pypy/stmgc/changeset/40ba082e00e8/
Log: become_inevitable(): was missing resetting jmpbuf_ptr to NULL
diff --git a/c7/stm/core.c b/c7/stm/core.c
--- a/c7/stm/core.c
+++ b/c7/stm/core.c
@@ -505,7 +505,7 @@
__builtin_longjmp(*jmpbuf_ptr, 1);
}
-void _stm_become_inevitable(char *msg)
+void _stm_become_inevitable(const char *msg)
{
mutex_lock();
switch (STM_PSEGMENT->transaction_state) {
@@ -517,6 +517,7 @@
/* become inevitable */
wait_for_end_of_inevitable_transaction(true);
STM_PSEGMENT->transaction_state = TS_INEVITABLE;
+ STM_SEGMENT->jmpbuf_ptr = NULL;
break;
case TS_MUST_ABORT:
@@ -525,5 +526,6 @@
default:
assert(!"invalid transaction_state in become_inevitable");
}
+ dprintf(("become_inevitable: %s\n", msg));
mutex_unlock();
}
diff --git a/c7/stmgc.h b/c7/stmgc.h
--- a/c7/stmgc.h
+++ b/c7/stmgc.h
@@ -64,7 +64,7 @@
void _stm_write_slowpath(object_t *);
object_t *_stm_allocate_slowpath(ssize_t);
object_t *_stm_allocate_external(ssize_t);
-void _stm_become_inevitable(char*);
+void _stm_become_inevitable(const char*);
void _stm_start_transaction(stm_thread_local_t *, stm_jmpbuf_t *);
void _stm_collectable_safe_point(void);
@@ -236,7 +236,7 @@
/* Turn the current transaction inevitable. The 'jmpbuf' passed to
STM_START_TRANSACTION() is not going to be used any more after
this call (but the stm_become_inevitable() itself may still abort). */
-static inline void stm_become_inevitable(char* msg) {
+static inline void stm_become_inevitable(const char* msg) {
if (STM_SEGMENT->jmpbuf_ptr != NULL)
_stm_become_inevitable(msg);
}
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit