INFO0
("Legend of the following listing: \"<process> on <host>: <status>.\"");
xbt_swag_foreach(process, simix_global->process_list) {
- smx_simdata_process_t p_simdata =
- (smx_simdata_process_t) process->simdata;
- // simdata_host_t h_simdata=(simdata_host_t)p_simdata->host->simdata;
char *who, *who2;
asprintf(&who, "%s on %s: %s",
process->name,
- p_simdata->smx_host->name,
- (process->simdata->blocked) ? "[BLOCKED] "
- : ((process->simdata->suspended) ? "[SUSPENDED] " : ""));
+ process->smx_host->name,
+ (process->blocked) ? "[BLOCKED] "
+ : ((process->suspended) ? "[SUSPENDED] " : ""));
- if (p_simdata->mutex) {
+ if (process->mutex) {
who2 =
bprintf("%s Blocked on mutex %p", who,
(XBT_LOG_ISENABLED(simix_kernel, xbt_log_priority_verbose)) ?
- p_simdata->mutex : (void *) 0xdead);
+ process->mutex : (void *) 0xdead);
free(who);
who = who2;
- } else if (p_simdata->cond) {
+ } else if (process->cond) {
who2 =
bprintf
("%s Blocked on condition %p; Waiting for the following actions:",
who,
(XBT_LOG_ISENABLED(simix_kernel, xbt_log_priority_verbose)) ?
- p_simdata->cond : (void *) 0xdead);
+ process->cond : (void *) 0xdead);
free(who);
who = who2;
- xbt_fifo_foreach(p_simdata->cond->actions, item, act, smx_action_t) {
+ xbt_fifo_foreach(process->cond->actions, item, act, smx_action_t) {
who2 =
bprintf("%s '%s'(%p)", who, act->name,
(XBT_LOG_ISENABLED(simix_kernel, xbt_log_priority_verbose))
xbt_fifo_foreach(smx_action->cond_list, _cursor, cond, smx_cond_t) {
xbt_swag_foreach(process, cond->sleeping) {
DEBUG2("\t preparing to wake up %s on %s",
- process->name, process->simdata->smx_host->name);
+ process->name, process->smx_host->name);
}
SIMIX_cond_broadcast(cond);
/* remove conditional from action */
xbt_fifo_foreach(smx_action->cond_list, _cursor, cond, smx_cond_t) {
xbt_swag_foreach(process, cond->sleeping) {
DEBUG2("\t preparing to wake up %s on %s",
- process->name, process->simdata->smx_host->name);
+ process->name, process->smx_host->name);
}
SIMIX_cond_broadcast(cond);
/* remove conditional from action */
while ((process = xbt_swag_extract(simix_global->process_to_run))) {
DEBUG2("Scheduling %s on %s",
- process->name, process->simdata->smx_host->name);
+ process->name, process->smx_host->name);
simix_global->current_process = process;
- xbt_context_schedule(process->simdata->context);
+ xbt_context_schedule(process->context);
/* fflush(NULL); */
simix_global->current_process = NULL;
}
void *arg = NULL;
xbt_dynar_foreach(model_list, iter, model) {
- if (xbt_swag_size(model->common_public->states.failed_action_set)
- || xbt_swag_size(model->common_public->states.done_action_set)) {
+ if (xbt_swag_size(model->states.failed_action_set)
+ || xbt_swag_size(model->states.done_action_set)) {
state_modifications = 1;
break;
}
DEBUG1("Elapsed_time %f", elapsed_time);
}
- while (surf_timer_model->extension_public->get(&fun, (void *) &arg)) {
+ while (surf_timer_model->extension.timer.get(&fun, (void *) &arg)) {
DEBUG2("got %p %p", fun, arg);
if (fun == SIMIX_process_create) {
smx_process_arg_t args = arg;
args->argc, args->argv,
args->properties);
if (process && args->kill_time > SIMIX_get_clock()) {
- surf_timer_model->extension_public->set(args->kill_time, (void *)
- &SIMIX_process_kill,
- (void *) process);
+ surf_timer_model->extension.timer.set(args->kill_time, (void *)
+ &SIMIX_process_kill,
+ (void *) process);
}
xbt_free(args);
}
if (fun == SIMIX_process_kill) {
process = arg;
DEBUG2("Killing %s on %s", process->name,
- process->simdata->smx_host->name);
+ process->smx_host->name);
SIMIX_process_kill(process);
}
}
/* Wake up all process waiting for the action finish */
xbt_dynar_foreach(model_list, iter, model) {
- while ((action =
- xbt_swag_extract(model->common_public->
- states.failed_action_set))) {
+ while ((action = xbt_swag_extract(model->states.failed_action_set))) {
smx_action = action->data;
if (smx_action) {
xbt_fifo_unshift(actions_failed, smx_action);
}
}
- while ((action =
- xbt_swag_extract(model->common_public->
- states.done_action_set))) {
+ while ((action = xbt_swag_extract(model->states.done_action_set))) {
smx_action = action->data;
if (smx_action) {
xbt_fifo_unshift(actions_done, smx_action);
*/
void SIMIX_timer_set(double date, void *function, void *arg)
{
- surf_timer_model->extension_public->set(date, function, arg);
+ surf_timer_model->extension.timer.set(date, function, arg);
}
int SIMIX_timer_get(void **function, void **arg)
{
- return surf_timer_model->extension_public->get(function, arg);
+ return surf_timer_model->extension.timer.get(function, arg);
}
/**