static double sg_host_get_available_at(const_sg_host_t host)
{
- const struct _HostAttribute* attr = (HostAttribute)sg_host_data(host);
+ const struct _HostAttribute* attr = (HostAttribute)sg_host_get_data(host);
return attr->available_at;
}
static void sg_host_set_available_at(sg_host_t host, double time)
{
- HostAttribute attr = (HostAttribute)sg_host_data(host);
+ HostAttribute attr = (HostAttribute)sg_host_get_data(host);
attr->available_at = time;
- sg_host_data_set(host, attr);
+ sg_host_set_data(host, attr);
}
static SD_task_t sg_host_get_last_scheduled_task(const_sg_host_t host)
{
- const struct _HostAttribute* attr = (HostAttribute)sg_host_data(host);
+ const struct _HostAttribute* attr = (HostAttribute)sg_host_get_data(host);
return attr->last_scheduled_task;
}
static void sg_host_set_last_scheduled_task(sg_host_t host, SD_task_t task){
- HostAttribute attr = (HostAttribute)sg_host_data(host);
+ HostAttribute attr = (HostAttribute)sg_host_get_data(host);
attr->last_scheduled_task=task;
- sg_host_data_set(host, attr);
+ sg_host_set_data(host, attr);
}
static xbt_dynar_t get_ready_tasks(const_xbt_dynar_t dax)
sg_host_t *hosts = sg_host_list();
for (cursor = 0; cursor < total_nhosts; cursor++)
- sg_host_data_set(hosts[cursor], xbt_new0(struct _HostAttribute, 1));
+ sg_host_set_data(hosts[cursor], xbt_new0(struct _HostAttribute, 1));
/* load the DAX file */
xbt_dynar_t dax = SD_daxload(argv[2]);
xbt_dynar_free_container(&dax);
for (cursor = 0; cursor < total_nhosts; cursor++) {
- free(sg_host_data(hosts[cursor]));
- sg_host_data_set(hosts[cursor], NULL);
+ free(sg_host_get_data(hosts[cursor]));
+ sg_host_set_data(hosts[cursor], NULL);
}
xbt_free(hosts);