From 4c6ed919262f2343e7df3284ed184a5fc6a3dbbd Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 19 Feb 2019 16:36:31 +0100 Subject: [PATCH] Kill now unused mc_xbt. --- src/mc/mc_comm_pattern.cpp | 1 - src/mc/mc_request.cpp | 1 - src/mc/mc_state.cpp | 1 - src/mc/mc_xbt.cpp | 42 -------------------------------- src/mc/mc_xbt.hpp | 26 -------------------- tools/cmake/DefinePackages.cmake | 2 -- 6 files changed, 73 deletions(-) delete mode 100644 src/mc/mc_xbt.cpp delete mode 100644 src/mc/mc_xbt.hpp diff --git a/src/mc/mc_comm_pattern.cpp b/src/mc/mc_comm_pattern.cpp index 898c03654d..0d6bd6bc79 100644 --- a/src/mc/mc_comm_pattern.cpp +++ b/src/mc/mc_comm_pattern.cpp @@ -11,7 +11,6 @@ #include "src/mc/checker/CommunicationDeterminismChecker.hpp" #include "src/mc/mc_comm_pattern.hpp" #include "src/mc/mc_smx.hpp" -#include "src/mc/mc_xbt.hpp" using simgrid::mc::remote; diff --git a/src/mc/mc_request.cpp b/src/mc/mc_request.cpp index 1aa4073d3a..3d5d0880d3 100644 --- a/src/mc/mc_request.cpp +++ b/src/mc/mc_request.cpp @@ -9,7 +9,6 @@ #include "src/kernel/activity/MutexImpl.hpp" #include "src/mc/ModelChecker.hpp" #include "src/mc/mc_smx.hpp" -#include "src/mc/mc_xbt.hpp" using simgrid::mc::remote; diff --git a/src/mc/mc_state.cpp b/src/mc/mc_state.cpp index 707a6d0d99..14813de16a 100644 --- a/src/mc/mc_state.cpp +++ b/src/mc/mc_state.cpp @@ -7,7 +7,6 @@ #include "src/mc/mc_request.hpp" #include "src/mc/mc_smx.hpp" #include "src/mc/mc_state.hpp" -#include "src/mc/mc_xbt.hpp" #include diff --git a/src/mc/mc_xbt.cpp b/src/mc/mc_xbt.cpp deleted file mode 100644 index 5d3f00ef4e..0000000000 --- a/src/mc/mc_xbt.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2014-2019. 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. */ - -#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, RemotePtr addr, std::size_t i, std::size_t len) -{ - s_xbt_dynar_t d; - as.read_bytes(&d, sizeof(d), addr); - if (i >= d.used) - xbt_die("Out of bound index %zu/%lu", i, d.used); - if (len != d.elmsize) - xbt_die("Bad size in simgrid::mc::read_element"); - as.read_bytes(local, len, remote(xbt_dynar_get_ptr(&d, i))); -} - -std::size_t read_length(AddressSpace const& as, RemotePtr addr) -{ - if (not addr) - return 0; - unsigned long res; - as.read_bytes(&res, sizeof(res), - remote(&((xbt_dynar_t)addr.address())->used)); - return res; -} - -} -} diff --git a/src/mc/mc_xbt.hpp b/src/mc/mc_xbt.hpp deleted file mode 100644 index 12c6053155..0000000000 --- a/src/mc/mc_xbt.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (c) 2014-2019. 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. */ - -#ifndef SIMGRID_MC_XBT_HPP -#define SIMGRID_MC_XBT_HPP - -#include "xbt/dynar.h" - -#include "src/mc/AddressSpace.hpp" -#include "src/mc/remote/RemotePtr.hpp" - -namespace simgrid { -namespace mc { - -XBT_PRIVATE void read_element(AddressSpace const& as, - void* local, RemotePtr addr, std::size_t i, std::size_t len); -XBT_PRIVATE std::size_t read_length( - AddressSpace const& as, RemotePtr addr); - -} -} - -#endif diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index 489e92a710..beea24848d 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -656,8 +656,6 @@ set(MC_SRC src/mc/mc_client_api.cpp src/mc/mc_smx.hpp src/mc/mc_smx.cpp - src/mc/mc_xbt.hpp - src/mc/mc_xbt.cpp src/mc/mc_exit.hpp src/mc/Transition.hpp ) -- 2.20.1