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
cleanups in teshsuite/simdag/platforms, don't ask why
[simgrid.git]
/
teshsuite
/
simdag
/
platforms
/
basic_tracing.c
diff --git
a/teshsuite/simdag/platforms/basic_tracing.c
b/teshsuite/simdag/platforms/basic_tracing.c
index
10bb847
..
606b219
100644
(file)
--- a/
teshsuite/simdag/platforms/basic_tracing.c
+++ b/
teshsuite/simdag/platforms/basic_tracing.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2008
, 2009, 2010
. The SimGrid Team.
+/* Copyright (c) 2008
-2015
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-6,8
+6,7
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
-#include "msg/msg.h"
-#include "surf/surf_private.h"
+#include "simgrid/msg.h"
int host(int argc, char *argv[]);
int host(int argc, char *argv[]);
@@
-22,17
+21,15
@@
int host(int argc, char *argv[])
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
- int res;
- MSG_global_init(&argc, argv);
+ MSG_init(&argc, argv);
MSG_create_environment(argv[1]);
MSG_function_register("host", host);
MSG_create_environment(argv[1]);
MSG_function_register("host", host);
- MSG_process_create( "host", host, NULL, MSG_get_host_table()[0] );
+ xbt_dynar_t all_hosts = MSG_hosts_as_dynar();
+ MSG_process_create( "host", host, NULL, xbt_dynar_pop_as(all_hosts,msg_host_t));
+ xbt_dynar_free(&all_hosts);
- res = MSG_main();
+
int
res = MSG_main();
XBT_INFO("Simulation time %g", MSG_get_clock());
XBT_INFO("Simulation time %g", MSG_get_clock());
- MSG_clean();
- if (res == MSG_OK)
- return 0;
- else
- return 1;
+
+ return res != MSG_OK;
}
}