X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b08e93079ce626559903d763ea5c79d3de220a24..a7f9c211eacf8b7ee21fca73bcbcedfdc13f6ce6:/src/mc/mc_xbt.cpp diff --git a/src/mc/mc_xbt.cpp b/src/mc/mc_xbt.cpp index 7742139b8a..257ebb47f6 100644 --- a/src/mc/mc_xbt.cpp +++ b/src/mc/mc_xbt.cpp @@ -4,14 +4,20 @@ /* 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. */ -#include "mc/AddressSpace.hpp" -#include "mc_xbt.hpp" +#include + +#include "src/mc/AddressSpace.hpp" +#include "src/mc/mc_xbt.hpp" +#include "src/mc/remote/RemotePtr.hpp" + +#include "xbt/dynar.h" +#include "xbt/sysdep.h" namespace simgrid { namespace mc { void read_element(AddressSpace const& as, - void* local, remote_ptr addr, size_t i, size_t len) + void* local, RemotePtr addr, std::size_t i, std::size_t len) { s_xbt_dynar_t d; as.read_bytes(&d, sizeof(d), addr); @@ -22,9 +28,9 @@ void read_element(AddressSpace const& as, as.read_bytes(local, len, remote(xbt_dynar_get_ptr(&d, i))); } -std::size_t read_length(AddressSpace const& as, remote_ptr addr) +std::size_t read_length(AddressSpace const& as, RemotePtr addr) { - if (!addr) + if (not addr) return 0; unsigned long res; as.read_bytes(&res, sizeof(res),