X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cf108868b4eeed4d0d9d343bc68557d7814e18c0..32dda1d6e208496b7ce85e5f5b677fb295e82277:/src/mc/mc_ignore.cpp diff --git a/src/mc/mc_ignore.cpp b/src/mc/mc_ignore.cpp index 6017779fa2..16548a6f02 100644 --- a/src/mc/mc_ignore.cpp +++ b/src/mc/mc_ignore.cpp @@ -5,19 +5,18 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "src/internal_config.h" -#include "src/mc/mc_object_info.h" #include "src/mc/mc_private.h" #include "src/smpi/private.h" #include "src/mc/mc_snapshot.h" #include "src/mc/mc_ignore.h" #include "src/mc/mc_protocol.h" -#include "src/mc/mc_client.h" - -extern "C" { +#include "src/mc/Client.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ignore, mc, "Logging specific to MC ignore mechanism"); +extern "C" { + // ***** Model-checked void MC_ignore_heap(void *address, size_t size) @@ -44,7 +43,7 @@ void MC_ignore_heap(void *address, size_t size) heap->heapinfo[message.block].busy_frag.ignore[message.fragment]++; } - if (MC_protocol_send(mc_client->fd, &message, sizeof(message))) + if (simgrid::mc::Client::get()->getChannel().send(message)) xbt_die("Could not send ignored region to MCer"); } @@ -57,7 +56,8 @@ void MC_remove_ignore_heap(void *address, size_t size) message.type = MC_MESSAGE_UNIGNORE_HEAP; message.addr = (std::uintptr_t) address; message.size = size; - MC_client_send_message(&message, sizeof(message)); + if (simgrid::mc::Client::get()->getChannel().send(message)) + xbt_die("Could not send UNIGNORE_HEAP mesasge to model-checker"); } void MC_ignore_global_variable(const char *name) @@ -92,17 +92,18 @@ void MC_register_stack_area(void *stack, smx_process_t process, ucontext_t* cont region.block = ((char *) stack - (char *) heap->heapbase) / BLOCKSIZE + 1; -#ifdef HAVE_SMPI - if (smpi_privatize_global_variables && process) { +#if HAVE_SMPI + if (smpi_privatize_global_variables && process) region.process_index = smpi_process_index_of_smx_process(process); - } else + else #endif region.process_index = -1; s_mc_stack_region_message_t message; message.type = MC_MESSAGE_STACK_REGION; message.stack_region = region; - MC_client_send_message(&message, sizeof(message)); + if (simgrid::mc::Client::get()->getChannel().send(message)) + xbt_die("Coule not send STACK_REGION to model-checker"); } }