[pypy-commit] stmgc default: Expand/clarify documentation of stm_become_inevitable.
devin.jeanpierre
noreply at buildbot.pypy.org
Wed Apr 15 09:56:14 CEST 2015
Author: Devin Jeanpierre <jeanpierreda at gmail.com>
Branch:
Changeset: r1755:c5225f44a522
Date: 2015-04-14 21:52 -0400
http://bitbucket.org/pypy/stmgc/changeset/c5225f44a522/
Log: Expand/clarify documentation of stm_become_inevitable.
diff --git a/c7/stmgc.h b/c7/stmgc.h
--- a/c7/stmgc.h
+++ b/c7/stmgc.h
@@ -340,8 +340,6 @@
returns: it jumps back to the stm_start_transaction(). */
void stm_abort_transaction(void) __attribute__((noreturn));
-/* Turn the current transaction inevitable.
- The stm_become_inevitable() itself may still abort. */
#ifdef STM_NO_AUTOMATIC_SETJMP
int stm_is_inevitable(void);
#else
@@ -349,6 +347,10 @@
return !rewind_jmp_armed(&STM_SEGMENT->running_thread->rjthread);
}
#endif
+
+/* Turn the current transaction inevitable.
+ stm_become_inevitable() itself may still abort the transaction instead
+ of returning. */
static inline void stm_become_inevitable(stm_thread_local_t *tl,
const char* msg) {
assert(STM_SEGMENT->running_thread == tl);
diff --git a/c8/stmgc.h b/c8/stmgc.h
--- a/c8/stmgc.h
+++ b/c8/stmgc.h
@@ -341,6 +341,10 @@
return !rewind_jmp_armed(&STM_SEGMENT->running_thread->rjthread);
}
#endif
+
+/* Turn the current transaction inevitable.
+ stm_become_inevitable() itself may still abort the transaction instead
+ of returning. */
static inline void stm_become_inevitable(stm_thread_local_t *tl,
const char* msg) {
assert(STM_SEGMENT->running_thread == tl);
More information about the pypy-commit
mailing list