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
Some functions added (not all), the code compile, but it wasn't tested
[simgrid.git]
/
src
/
msg_simix
/
environment.c
diff --git
a/src/msg_simix/environment.c
b/src/msg_simix/environment.c
index
ff3fa42
..
c547d80
100644
(file)
--- a/
src/msg_simix/environment.c
+++ b/
src/msg_simix/environment.c
@@
-22,7
+22,13
@@
*/
m_host_t MSG_get_host_by_name(const char *name)
{
*/
m_host_t MSG_get_host_by_name(const char *name)
{
- return NULL;
+ smx_host_t simix_h = NULL;
+
+ simix_h = SIMIX_host_get_by_name(name);
+ if (simix_h == NULL) {
+ return NULL;
+ }
+ else return (m_host_t)simix_h->data;
}
/** \ingroup msg_easier_life
}
/** \ingroup msg_easier_life
@@
-43,6
+49,16
@@
m_host_t MSG_get_host_by_name(const char *name)
*/
void MSG_create_environment(const char *file)
{
*/
void MSG_create_environment(const char *file)
{
+ smx_host_t *workstation = NULL;
+ int i;
+
+ SIMIX_create_environment(file);
+
+ /* Initialize MSG hosts */
+ workstation = SIMIX_host_get_table();
+ for (i=0; i< SIMIX_host_get_number();i++) {
+ __MSG_host_create(workstation[i], NULL);
+ }
return;
}
return;
}