X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/03e114f11978dd546b729f043b0d5ffd85c31aa5..a99521dceee7427ae34a9f95d9afcc6b4ff240a5:/src/mc/remote/Client.cpp diff --git a/src/mc/remote/Client.cpp b/src/mc/remote/Client.cpp index 291d359a97..ada56e0be0 100644 --- a/src/mc/remote/Client.cpp +++ b/src/mc/remote/Client.cpp @@ -1,10 +1,11 @@ -/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-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 +#include #include #include @@ -12,7 +13,6 @@ #include #include -#include #include #include @@ -77,13 +77,13 @@ Client* Client::initialize() #error "no ptrace equivalent coded for this platform" #endif if (errno != 0 || raise(SIGSTOP) != 0) - xbt_die("Could not wait for the model-checker"); + xbt_die("Could not wait for the model-checker (errno = %d: %s)", errno, strerror(errno)); instance_->handleMessages(); return instance_.get(); } -void Client::handleDeadlockCheck(s_mc_message_t* msg) +void Client::handleDeadlockCheck(s_mc_message_t*) { bool deadlock = false; if (not simix_global->process_list.empty()) { @@ -99,7 +99,7 @@ void Client::handleDeadlockCheck(s_mc_message_t* msg) s_mc_message_int_t answer{MC_MESSAGE_DEADLOCK_CHECK_REPLY, deadlock}; xbt_assert(channel_.send(answer) == 0, "Could not send response"); } -void Client::handleContinue(s_mc_message_t* msg) +void Client::handleContinue(s_mc_message_t*) { /* Nothing to do */ } @@ -115,7 +115,7 @@ void Client::handleSimcall(s_mc_message_simcall_handle_t* message) void Client::handleRestore(s_mc_message_restore_t* message) { #if HAVE_SMPI - smpi_really_switch_data_segment(message->index); + smpi_really_switch_data_segment(simgrid::s4u::Actor::by_pid(message->index)); #endif } void Client::handleActorEnabled(s_mc_message_actor_enabled_t* msg) @@ -187,7 +187,7 @@ void Client::mainLoop() } } -void Client::reportAssertionFailure(const char* description) +void Client::reportAssertionFailure() { if (channel_.send(MC_MESSAGE_ASSERTION_FAILED)) xbt_die("Could not send assertion to model-checker"); @@ -259,8 +259,8 @@ void Client::declareStack(void* stack, size_t size, smx_actor_t process, ucontex region.size = size; region.block = ((char*)stack - (char*)heap->heapbase) / BLOCKSIZE + 1; #if HAVE_SMPI - if (smpi_privatize_global_variables == SMPI_PRIVATIZE_MMAP && process) - region.process_index = process->pid - 1; + if (smpi_privatize_global_variables == SmpiPrivStrategies::MMAP && process) + region.process_index = process->pid_ - 1; else #endif region.process_index = -1;