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
hello, automake-1.10
[simgrid.git]
/
tools
/
gras
/
stub_generator.c
diff --git
a/tools/gras/stub_generator.c
b/tools/gras/stub_generator.c
index
628c28a
..
4b7a570
100644
(file)
--- a/
tools/gras/stub_generator.c
+++ b/
tools/gras/stub_generator.c
@@
-19,6
+19,7
@@
#include "xbt/log.h"
#include "surf/surfxml_parse.h"
#include "surf/surf.h"
#include "xbt/log.h"
#include "surf/surfxml_parse.h"
#include "surf/surf.h"
+#include "portable.h" /* Needed for the time of the SIMIX convertion */
#include <stdarg.h>
#include <stdarg.h>
@@
-279,13
+280,13
@@
const char *SIM_PREEMBULE =
const char *SIM_MAIN_POSTEMBULE = "\n"
"\n"
const char *SIM_MAIN_POSTEMBULE = "\n"
"\n"
-"
MSG
_launch_application(argv[2]);\n"
+"
gras
_launch_application(argv[2]);\n"
"\n"
" /* Run the simulation */\n"
"\n"
" /* Run the simulation */\n"
-"
MSG
_main();\n"
+"
gras
_main();\n"
"\n"
" /* cleanup the place */\n"
"\n"
" /* cleanup the place */\n"
-"
MSG
_clean();\n"
+"
gras
_clean();\n"
" if (gras_log)\n"
" free(gras_log);\n"
" return 0;\n"
" if (gras_log)\n"
" free(gras_log);\n"
" return 0;\n"
@@
-408,21
+409,19
@@
static void generate_sim(char *project)
fprintf(OUT, "%s", "int main (int argc,char *argv[]) {\n"
"\n"
" /* Simulation setup */\n"
fprintf(OUT, "%s", "int main (int argc,char *argv[]) {\n"
"\n"
" /* Simulation setup */\n"
- "
MSG_global_init(&argc,argv);\n"
+ "
gras_global_init(&argc,argv);\n"
" if (argc != 3) {\n"
" fprintf(stderr, \"Usage: %s platform.xml deployment.xml [--gras-log=...]\\n\",argv[0]);\n"
" exit(1);\n"
" }\n"
"\n");
" if (argc != 3) {\n"
" fprintf(stderr, \"Usage: %s platform.xml deployment.xml [--gras-log=...]\\n\",argv[0]);\n"
" exit(1);\n"
" }\n"
"\n");
- fprintf(OUT,
- " MSG_paje_output(\"%s.trace\");\n"
- " MSG_set_channel_number(XBT_MAX_CHANNEL); /* Using at most 10 channel (ports) per host. Change it here if needed */\n"
- " MSG_create_environment(argv[1]);\n"
+ fprintf(OUT,
+ " gras_create_environment(argv[1]);\n"
"\n"
"\n"
- " /* Application deployment */\n"
,
-
project
);
+ " /* Application deployment */\n"
+ );
xbt_dict_foreach(process_function_set,cursor,key,data) {
xbt_dict_foreach(process_function_set,cursor,key,data) {
- fprintf(OUT,"
MSG
_function_register(\"%s\", launch_%s);\n",key,key);
+ fprintf(OUT,"
gras
_function_register(\"%s\", launch_%s);\n",key,key);
}
fprintf(OUT, "%s", SIM_MAIN_POSTEMBULE);
fclose(OUT);
}
fprintf(OUT, "%s", SIM_MAIN_POSTEMBULE);
fclose(OUT);
@@
-457,7
+456,7
@@
static void generate_rl(char *project)
"#include <signal.h>\n" \
"#include <gras.h>\n" \
"\n" \
"#include <signal.h>\n" \
"#include <gras.h>\n" \
"\n" \
- "
extern const char * XBT_PUBLIC_DATA
_gras_procname;\n" \
+ "
XBT_PUBLIC_DATA(const char *)
_gras_procname;\n" \
"/* user code */\n" \
"int %s(int argc, char *argv[]);\n" \
"\n" \
"/* user code */\n" \
"int %s(int argc, char *argv[]);\n" \
"\n" \