OSDN Git Service

PR bootstrap/52287
[pf3gnuchains/gcc-fork.git] / libitm / libitm_i.h
index c00389d..e826abd 100644 (file)
@@ -142,7 +142,14 @@ struct gtm_undolog
   size_t size() const { return undolog.size(); }
 
   // In local.cc
-  void rollback (size_t until_size = 0);
+  void rollback (gtm_thread* tx, size_t until_size = 0);
+};
+
+// An entry of a read or write log.  Used by multi-lock TM methods.
+struct gtm_rwlog_entry
+{
+  atomic<gtm_word> *orec;
+  gtm_word value;
 };
 
 // Contains all thread-specific data required by the entire library.
@@ -174,6 +181,10 @@ struct gtm_thread
   // Data used by local.c for the undo log for both local and shared memory.
   gtm_undolog undolog;
 
+  // Read and write logs.  Used by multi-lock TM methods.
+  vector<gtm_rwlog_entry> readlog;
+  vector<gtm_rwlog_entry> writelog;
+
   // Data used by alloc.c for the malloc/free undo log.
   aa_tree<uintptr_t, gtm_alloc_action> alloc_actions;
 
@@ -320,6 +331,7 @@ extern abi_dispatch *dispatch_serial();
 extern abi_dispatch *dispatch_serialirr();
 extern abi_dispatch *dispatch_serialirr_onwrite();
 extern abi_dispatch *dispatch_gl_wt();
+extern abi_dispatch *dispatch_ml_wt();
 
 extern gtm_cacheline_mask gtm_mask_stack(gtm_cacheline *, gtm_cacheline_mask);