decl.c (components_to_record): Set a name on the type created for the REP part, if...
[gcc.git] / libitm / method-serial.cc
index 1123e34d56ba1cb42a117285e5fd2e78120fa210..65942d3fbd63a61cd18b954e74a92df0064a546b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2019 Free Software Foundation, Inc.
    Contributed by Richard Henderson <rth@redhat.com>.
 
    This file is part of the GNU Transactional Memory Library (libitm).
@@ -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
 
@@ -306,7 +306,7 @@ GTM::gtm_thread::serialirr_mode ()
       // We're already serial, so we don't need to ensure privatization safety
       // for other transactions here.
       gtm_word priv_time = 0;
-      bool ok = disp->trycommit (priv_time);
+      bool ok __attribute__((unused)) = disp->trycommit (priv_time);
       // Given that we're already serial, the trycommit better work.
       assert (ok);
     }