Author: Armin Rigo <ar...@tunes.org> Branch: c8-gil-like Changeset: r1823:0fdbe7318e9f Date: 2015-06-13 18:27 +0200 http://bitbucket.org/pypy/stmgc/changeset/0fdbe7318e9f/
Log: Backed out changeset a8a04abfa22e diff --git a/c8/stm/setup.c b/c8/stm/setup.c --- a/c8/stm/setup.c +++ b/c8/stm/setup.c @@ -233,6 +233,8 @@ { int num; s_mutex_lock(); + tl->self = tl; /* for faster access to &stm_thread_local (and easier + from the PyPy JIT, too) */ if (stm_all_thread_locals == NULL) { stm_all_thread_locals = tl->next = tl->prev = tl; num = 0; diff --git a/c8/stmgc.h b/c8/stmgc.h --- a/c8/stmgc.h +++ b/c8/stmgc.h @@ -71,7 +71,7 @@ /* the next fields are handled internally by the library */ int last_associated_segment_num; /* always a valid seg num */ int thread_local_counter; - struct stm_thread_local_s *prev, *next; + struct stm_thread_local_s *self, *prev, *next; void *creating_pthread[2]; } stm_thread_local_t; @@ -87,10 +87,10 @@ long _stm_start_transaction(stm_thread_local_t *tl); void _stm_commit_transaction(void); void _stm_leave_noninevitable_transactional_zone(void); -#define _stm_detach_inevitable_transaction(tl) do { \ - write_fence(); \ - assert(_stm_detached_inevitable_from_thread == 0); \ - _stm_detached_inevitable_from_thread = (intptr_t)(tl); \ +#define _stm_detach_inevitable_transaction(tl) do { \ + write_fence(); \ + assert(_stm_detached_inevitable_from_thread == 0); \ + _stm_detached_inevitable_from_thread = (intptr_t)(tl->self); \ } while (0) void _stm_reattach_transaction(stm_thread_local_t *tl); void _stm_become_inevitable(const char*); _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit