A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename conf to optorsim
[simgrid.git]
/
src
/
simgrid
/
host.cpp
diff --git
a/src/simgrid/host.cpp
b/src/simgrid/host.cpp
index 031e452ce5c5d95b54973bdb424444a58ca88450..cbe140a7304b4df0a45dc328c387cc70c7cf05a3 100644
(file)
--- a/
src/simgrid/host.cpp
+++ b/
src/simgrid/host.cpp
@@
-29,14
+29,14
@@
size_t sg_host_count()
* internally).
* \see sg_host_count()
*/
* internally).
* \see sg_host_count()
*/
-
const
sg_host_t *sg_host_list(void) {
+sg_host_t *sg_host_list(void) {
xbt_assert(sg_host_count() > 0, "There is no host!");
return (sg_host_t*)xbt_dynar_to_array(sg_hosts_as_dynar());
}
const char *sg_host_get_name(sg_host_t host)
{
xbt_assert(sg_host_count() > 0, "There is no host!");
return (sg_host_t*)xbt_dynar_to_array(sg_hosts_as_dynar());
}
const char *sg_host_get_name(sg_host_t host)
{
-
return host->name().c_str();
+ return host->name().c_str();
}
void* sg_host_extension_get(sg_host_t host, size_t ext)
}
void* sg_host_extension_get(sg_host_t host, size_t ext)
@@
-67,7
+67,7
@@
xbt_dynar_t sg_hosts_as_dynar(void)
const char* name = nullptr;
simgrid::s4u::Host* host = nullptr;
xbt_dict_foreach(host_list, cursor, name, host)
const char* name = nullptr;
simgrid::s4u::Host* host = nullptr;
xbt_dict_foreach(host_list, cursor, name, host)
- if
(routing_get_network_element_type(name
) == SURF_NETWORK_ELEMENT_HOST)
+ if
(host && host->pimpl_netcard && host->pimpl_netcard->getRcType(
) == SURF_NETWORK_ELEMENT_HOST)
xbt_dynar_push(res, &host);
return res;
}
xbt_dynar_push(res, &host);
return res;
}
@@
-86,7
+86,7
@@
void sg_host_init()
});
ROUTING_HOST_LEVEL = simgrid::s4u::Host::extension_create([](void *p) {
});
ROUTING_HOST_LEVEL = simgrid::s4u::Host::extension_create([](void *p) {
-
delete static_cast<simgrid::surf::NetCard*>(p);
+ delete static_cast<simgrid::surf::NetCard*>(p);
});
SD_HOST_LEVEL = simgrid::s4u::Host::extension_create(NULL);
});
SD_HOST_LEVEL = simgrid::s4u::Host::extension_create(NULL);
@@
-107,7
+107,7
@@
void sg_host_user_destroy(sg_host_t host) {
// ========== MSG Layer ==============
msg_host_priv_t sg_host_msg(sg_host_t host) {
// ========== MSG Layer ==============
msg_host_priv_t sg_host_msg(sg_host_t host) {
-
return (msg_host_priv_t) host->extension(MSG_HOST_LEVEL);
+ return (msg_host_priv_t) host->extension(MSG_HOST_LEVEL);
}
void sg_host_msg_set(sg_host_t host, msg_host_priv_t smx_host) {
host->extension_set(MSG_HOST_LEVEL, smx_host);
}
void sg_host_msg_set(sg_host_t host, msg_host_priv_t smx_host) {
host->extension_set(MSG_HOST_LEVEL, smx_host);