]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/sosp/Region.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mcapi::automaton_state_compare() in insert_visited_pair()
[simgrid.git] / src / mc / sosp / Region.cpp
index 1cc01058c207adc6b5c73080af2b4764314fbff0..653586c0471ea983566faaf8004af49057f47119 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -24,15 +24,15 @@ Region::Region(RegionType region_type, void* start_addr, size_t size)
 {
   xbt_assert((((uintptr_t)start_addr) & (xbt_pagesize - 1)) == 0, "Start address not at the beginning of a page");
 
-  chunks_ = ChunkedData(mc_model_checker->page_store(), mc_model_checker->process(), RemotePtr<void>(start_addr),
-                        mmu::chunk_count(size));
+  chunks_ = ChunkedData(mc_model_checker->page_store(), mc_model_checker->get_remote_simulation(),
+                        RemotePtr<void>(start_addr), mmu::chunk_count(size));
 }
 
 /** @brief Restore a region from a snapshot
  *
  *  @param region     Target region
  */
-void Region::restore()
+void Region::restore() const
 {
   xbt_assert(((start().address()) & (xbt_pagesize - 1)) == 0, "Not at the beginning of a page");
   xbt_assert(simgrid::mc::mmu::chunk_count(size()) == get_chunks().page_count());
@@ -40,7 +40,7 @@ void Region::restore()
   for (size_t i = 0; i != get_chunks().page_count(); ++i) {
     void* target_page       = (void*)simgrid::mc::mmu::join(i, (std::uintptr_t)(void*)start().address());
     const void* source_page = get_chunks().page(i);
-    mc_model_checker->process().write_bytes(source_page, xbt_pagesize, remote(target_page));
+    mc_model_checker->get_remote_simulation().write_bytes(source_page, xbt_pagesize, remote(target_page));
   }
 }