@schedBegin.acquire()
MSG::debug("Let's execute the main() of the Ruby process")
main(@pargs)
-# processExit(self) # Exit the Native Process
@schedEnd.release()
+ MSG::debug("Released my schedEnd, bailing out")
+ processExit(self) # Exit the Native Process
end
m_process_t proc = ((smx_process_t) arg)->data;
xbt_fifo_remove(msg_global->process_list, proc);
SIMIX_process_cleanup(arg);
- free(proc->name);
- proc->name = NULL;
- free(proc->simdata);
- proc->simdata = NULL;
+ if (proc->name) {
+ free(proc->name);
+ proc->name = NULL;
+ }
+ if (proc->simdata) {
+ free(proc->simdata);
+ proc->simdata = NULL;
+ }
free(proc);
return;
free(context);
context = NULL;
}*/
- DEBUG1("smx_ctx_ruby_free_context(%s)",context->argv[0]);
- free (context);
- context = NULL;
+ if (context) {
+ DEBUG1("smx_ctx_ruby_free_context(%p)",context);
+ free (context);
+ context = NULL;
+ }
}
static void smx_ctx_ruby_start(smx_context_t context) {
}
static void smx_ctx_ruby_stop(smx_context_t context) {
- DEBUG1("smx_ctx_ruby_stop(%s)",context->argv[0]);
+ DEBUG0("smx_ctx_ruby_stop()");
VALUE process = Qnil;
smx_ctx_ruby_t ctx_ruby,current;
process = ctx_ruby->process;
ctx_ruby->process = Qnil;
}
- DEBUG1("smx_ctx_ruby_stop(%s)...Done",context->argv[0]);
}
static void smx_ctx_ruby_suspend(smx_context_t context) {