diff options
author | Torvald Riegel <triegel@redhat.com> | 2016-01-22 16:13:06 +0000 |
---|---|---|
committer | Torvald Riegel <torvald@gcc.gnu.org> | 2016-01-22 16:13:06 +0000 |
commit | 6041f70ae3c9822a41046a7826c1d33818d346bd (patch) | |
tree | 11c4d3a4315d5b73971745da630b492a4481574a /libitm/method-serial.cc | |
parent | 057f7d3afdba4fb5b8119d225140b94f37d1ac70 (diff) | |
download | gcc-6041f70ae3c9822a41046a7826c1d33818d346bd.tar.gz |
libitm: Fix HTM fastpath.
* beginend.cc (GTM::gtm_thread::serial_lock): Put on cacheline
boundary.
(htm_fastpath): Remove.
(gtm_thread::begin_transaction): Fix HTM fastpath.
(_ITM_commitTransaction): Adapt.
(_ITM_commitTransactionEH): Adapt.
* libitm/config/linux/rwlock.h (gtm_rwlock): Add htm_fastpath member
and accessors.
* libitm/config/posix/rwlock.h (gtm_rwlock): Likewise.
* libitm/config/posix/rwlock.cc (gtm_rwlock::gtm_rwlock): Adapt.
* libitm/config/x86/sjlj.S (_ITM_beginTransaction): Fix HTM fastpath.
* libitm/libitm_i.h (htm_fastpath): Remove declaration.
* libitm/method-serial.cc (htm_mg): Adapt.
(gtm_thread::serialirr_mode): Adapt.
* libitm/query.cc (_ITM_inTransaction, _ITM_getTransactionId): Adapt.
From-SVN: r232735
Diffstat (limited to 'libitm/method-serial.cc')
-rw-r--r-- | libitm/method-serial.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libitm/method-serial.cc b/libitm/method-serial.cc index 1123e34d56b..a151b669618 100644 --- a/libitm/method-serial.cc +++ b/libitm/method-serial.cc @@ -226,13 +226,13 @@ struct htm_mg : public method_group // Enable the HTM fastpath if the HW is available. The fastpath is // initially disabled. #ifdef USE_HTM_FASTPATH - htm_fastpath = htm_init(); + gtm_thread::serial_lock.set_htm_fastpath(htm_init()); #endif } virtual void fini() { // Disable the HTM fastpath. - htm_fastpath = 0; + gtm_thread::serial_lock.set_htm_fastpath(0); } }; @@ -292,7 +292,7 @@ GTM::gtm_thread::serialirr_mode () #if defined(USE_HTM_FASTPATH) // HTM fastpath. If we are executing a HW transaction, don't go serial but // continue. See gtm_thread::begin_transaction. - if (likely(htm_fastpath && !gtm_thread::serial_lock.is_write_locked())) + if (likely(!gtm_thread::serial_lock.htm_fastpath_disabled())) return; #endif |