-/* Copyright (c) 2007-2010, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2007-2010, 2013-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
surf_host_model = new HostL07Model();
Model *model = surf_host_model;
- xbt_dynar_push(model_list, &model);
- xbt_dynar_push(model_list_invoke, &model);
+ xbt_dynar_push(all_existing_models, &model);
}
if (!ptask_maxmin_system)
ptask_maxmin_system = lmm_system_new(1);
surf_host_model = NULL;
- surf_network_model = new NetworkL07Model();
- surf_cpu_model_pm = new CpuL07Model();
+ surf_network_model = new NetworkL07Model(this);
+ surf_cpu_model_pm = new CpuL07Model(this);
routing_model_create(surf_network_model->createLink("__loopback__",
498000000, NULL,
wk = new HostL07(this, name, NULL,
sg_host_edge(sg_host),
sg_host_surfcpu(sg_host));
-
+ surf_callback_emit(hostCreatedCallbacks, wk);
xbt_lib_set(host_lib, name, SURF_HOST_LEVEL, wk);
return wk;
{
m_refcount--;
if (!m_refcount) {
- if (actionHook::is_linked())
+ if (action_hook.is_linked())
p_stateSet->erase(p_stateSet->iterator_to(*this));
if (getVariable())
lmm_variable_free(ptask_maxmin_system, getVariable());