process->pid = simix_process_count++;
process->name = xbt_strdup(name);
process->smx_host = host;
- process->iwannadie = 0;
process->data = data;
VERB1("Create context %s", process->name);
DEBUG2("Killing process %s on %s", process->name, process->smx_host->name);
- process->iwannadie = 1;
+ process->context->iwannadie = 1;
process->blocked = 0;
process->suspended = 0;
/* FIXME: set doexception to 0 also? */
/* Ok, maestro returned control to us */
DEBUG1("Maestro returned control to me: '%s'", self->name);
- if (self->iwannadie)
+ if (self->context->iwannadie)
SIMIX_context_stop(self->context);
if (self->doexception) {
xbt_ex_display(e);
abort();
}
+
+smx_context_t SIMIX_process_get_context(smx_process_t p) {
+ return p->context;
+}
+void SIMIX_process_set_context(smx_process_t p,smx_context_t c) {
+ p->context = c;
+}