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/query.cc | |
parent | 057f7d3afdba4fb5b8119d225140b94f37d1ac70 (diff) | |
download | gcc-6041f70ae3c9822a41046a7826c1d33818d346bd.zip gcc-6041f70ae3c9822a41046a7826c1d33818d346bd.tar.gz gcc-6041f70ae3c9822a41046a7826c1d33818d346bd.tar.bz2 |
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/query.cc')
-rw-r--r-- | libitm/query.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libitm/query.cc b/libitm/query.cc index b7a1180..ddce846 100644 --- a/libitm/query.cc +++ b/libitm/query.cc @@ -49,7 +49,7 @@ _ITM_inTransaction (void) // a transaction and thus we can't deduce this by looking at just the serial // lock. This function isn't used in practice currently, so the easiest // way to handle it is to just abort. - if (htm_fastpath && htm_transaction_active()) + if (gtm_thread::serial_lock.get_htm_fastpath() && htm_transaction_active()) htm_abort(); #endif struct gtm_thread *tx = gtm_thr(); @@ -69,7 +69,7 @@ _ITM_getTransactionId (void) { #if defined(USE_HTM_FASTPATH) // See ITM_inTransaction. - if (htm_fastpath && htm_transaction_active()) + if (gtm_thread::serial_lock.get_htm_fastpath() && htm_transaction_active()) htm_abort(); #endif struct gtm_thread *tx = gtm_thr(); |