Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove an useless pimple around exceptions
[simgrid.git] / src / simix / smx_process.cpp
index 99063d9..2fb0858 100644 (file)
@@ -11,7 +11,7 @@
 #include "xbt/dict.h"
 #include "mc/mc.h"
 #include "src/mc/mc_replay.h"
 #include "xbt/dict.h"
 #include "mc/mc.h"
 #include "src/mc/mc_replay.h"
-#include "src/mc/mc_client.h"
+#include "src/mc/Client.hpp"
 #include "src/simix/smx_private.hpp"
 #include "src/msg/msg_private.h"
 
 #include "src/simix/smx_private.hpp"
 #include "src/msg/msg_private.h"
 
@@ -294,7 +294,7 @@ smx_process_t SIMIX_process_create(
        process->ppid = SIMIX_process_get_PID(parent_process);
        /* SMPI process have their own data segment and
           each other inherit from their father */
        process->ppid = SIMIX_process_get_PID(parent_process);
        /* SMPI process have their own data segment and
           each other inherit from their father */
-#ifdef HAVE_SMPI
+#if HAVE_SMPI
        if(smpi_privatize_global_variables){
          if( parent_process->pid != 0){
            SIMIX_segment_index_set(process, parent_process->segment_index);
        if(smpi_privatize_global_variables){
          if( parent_process->pid != 0){
            SIMIX_segment_index_set(process, parent_process->segment_index);
@@ -383,7 +383,7 @@ smx_process_t SIMIX_process_attach(
     process->ppid = SIMIX_process_get_PID(parent_process);
    /* SMPI process have their own data segment and
       each other inherit from their father */
     process->ppid = SIMIX_process_get_PID(parent_process);
    /* SMPI process have their own data segment and
       each other inherit from their father */
-  #ifdef HAVE_SMPI
+  #if HAVE_SMPI
     if(smpi_privatize_global_variables){
       if(parent_process->pid != 0){
         SIMIX_segment_index_set(process, parent_process->segment_index);
     if(smpi_privatize_global_variables){
       if(parent_process->pid != 0){
         SIMIX_segment_index_set(process, parent_process->segment_index);
@@ -926,13 +926,13 @@ void SIMIX_post_process_sleep(smx_synchro_t synchro)
   while ((simcall = (smx_simcall_t) xbt_fifo_shift(synchro->simcalls))) {
 
     switch (synchro->sleep.surf_sleep->getState()){
   while ((simcall = (smx_simcall_t) xbt_fifo_shift(synchro->simcalls))) {
 
     switch (synchro->sleep.surf_sleep->getState()){
-      case SURF_ACTION_FAILED:
+      case simgrid::surf::Action::State::failed:
         simcall->issuer->context->iwannadie = 1;
         //SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
         state = SIMIX_SRC_HOST_FAILURE;
         break;
 
         simcall->issuer->context->iwannadie = 1;
         //SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
         state = SIMIX_SRC_HOST_FAILURE;
         break;
 
-      case SURF_ACTION_DONE:
+      case simgrid::surf::Action::State::done:
         state = SIMIX_DONE;
         break;
 
         state = SIMIX_DONE;
         break;
 
@@ -1021,7 +1021,7 @@ void SIMIX_process_yield(smx_process_t self)
   if (self->doexception) {
     XBT_DEBUG("Wait, maestro left me an exception");
     self->doexception = 0;
   if (self->doexception) {
     XBT_DEBUG("Wait, maestro left me an exception");
     self->doexception = 0;
-    SMX_THROW();
+    RETHROW;
   }
 
   if(SMPI_switch_data_segment && self->segment_index != -1){
   }
 
   if(SMPI_switch_data_segment && self->segment_index != -1){