Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
comments, debugs and other minor glitches
[simgrid.git] / src / simix / smx_process.c
index 3e5bafc..e9418a4 100644 (file)
@@ -214,7 +214,7 @@ void SIMIX_process_create(smx_process_t *process,
   *process = NULL;
   smx_host_t host = SIMIX_host_get_by_name(hostname);
 
-  XBT_DEBUG("Start process %s on host %s", name, hostname);
+  XBT_DEBUG("Start process %s on host '%s'", name, hostname);
 
   if (!SIMIX_host_get_state(host)) {
     XBT_WARN("Cannot launch process '%s' on failed host '%s'", name,
@@ -318,7 +318,7 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
 
       case SIMIX_ACTION_COMMUNICATE:
         xbt_fifo_remove(process->comms, process->waiting_action);
-        SIMIX_comm_destroy(process->waiting_action);
+        SIMIX_comm_cancel(process->waiting_action);
         break;
 
         case SIMIX_ACTION_SLEEP:
@@ -333,6 +333,14 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
         case SIMIX_ACTION_IO:
           SIMIX_io_destroy(process->waiting_action);
           break;
+
+        /* **************************************/
+        /* TUTORIAL: New API                    */
+        case SIMIX_ACTION_NEW_API:
+          SIMIX_new_api_destroy(process->waiting_action);
+          break;
+        /* **************************************/
+
     }
   }
   if(!xbt_dynar_member(simix_global->process_to_run, &(process)) && process != issuer) {
@@ -571,7 +579,7 @@ xbt_dict_t SIMIX_process_get_properties(smx_process_t process)
 
 void SIMIX_pre_process_sleep(smx_simcall_t simcall)
 {
-  if (MC_IS_ENABLED) {
+  if (MC_is_active()) {
     MC_process_clock_add(simcall->issuer, simcall->process_sleep.duration);
     simcall->process_sleep.result = SIMIX_DONE;
     SIMIX_simcall_answer(simcall);
@@ -701,6 +709,7 @@ void SIMIX_process_yield(smx_process_t self)
     self->doexception = 0;
     SMX_THROW();
   }
+
 }
 
 /* callback: context fetching */
@@ -713,7 +722,7 @@ xbt_running_ctx_t *SIMIX_process_get_running_context(void)
 void SIMIX_process_exception_terminate(xbt_ex_t * e)
 {
   xbt_ex_display(e);
-  abort();
+  xbt_abort();
 }
 
 smx_context_t SIMIX_process_get_context(smx_process_t p) {