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
Remove xbt_dict host from simix.
[simgrid.git]
/
src
/
simix
/
smx_host.c
diff --git
a/src/simix/smx_host.c
b/src/simix/smx_host.c
index
b6eaec1
..
b655087
100644
(file)
--- a/
src/simix/smx_host.c
+++ b/
src/simix/smx_host.c
@@
-36,8
+36,7
@@
smx_host_t SIMIX_host_create(const char *name,
xbt_swag_new(xbt_swag_offset(proc, host_proc_hookup));
/* Update global variables */
xbt_swag_new(xbt_swag_offset(proc, host_proc_hookup));
/* Update global variables */
- xbt_dict_set(simix_global->host, smx_host->name, smx_host,
- &SIMIX_host_destroy);
+ xbt_lib_set(host_lib,smx_host->name,SIMIX_HOST_LEVEL,smx_host);
return smx_host;
}
return smx_host;
}
@@
-78,23
+77,13
@@
void SIMIX_host_destroy(void *h)
return;
}
return;
}
-/**
- * \brief Returns a dict of all hosts.
- *
- * \return List of all hosts (as a #xbt_dict_t)
- */
-xbt_dict_t SIMIX_host_get_dict(void)
-{
- return simix_global->host;
-}
-
smx_host_t SIMIX_host_get_by_name(const char *name)
{
xbt_assert0(((simix_global != NULL)
smx_host_t SIMIX_host_get_by_name(const char *name)
{
xbt_assert0(((simix_global != NULL)
- && (
simix_global->host
!= NULL)),
+ && (
host_lib
!= NULL)),
"Environment not set yet");
"Environment not set yet");
- return xbt_
dict_get_or_null(simix_global->host, name
);
+ return xbt_
lib_get_or_null(host_lib, name, SIMIX_HOST_LEVEL
);
}
smx_host_t SIMIX_host_self(void)
}
smx_host_t SIMIX_host_self(void)