if (sd_global->workstation_list == NULL) { /* this is the first time the function is called */
sd_global->workstation_list =
- xbt_new(SD_workstation_t, host_lib->count);
+ xbt_new(SD_workstation_t, xbt_lib_length(host_lib));
i = 0;
xbt_lib_foreach(host_lib, cursor, key, data) {
*/
int SD_workstation_get_number(void)
{
- return host_lib->count;
+ return xbt_lib_length(host_lib);
}
/**
}
/**
- * \brief Returns the latency of the route between two workstations, i.e. the sum of all link latencies
+ * \brief Returns the latency of the route between two workstations, i.e. the sum of all link latencies
* between the workstations.
*
* \param src the first workstation
}
/**
- * \brief Returns the bandwidth of the route between two workstations, i.e. the minimum link bandwidth of all
+ * \brief Returns the bandwidth of the route between two workstations, i.e. the minimum link bandwidth of all
* between the workstations.
*
* \param src the first workstation