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
Extend definition of simcalls to include a pointer to the simcall handler functions.
[simgrid.git]
/
src
/
simix
/
smx_smurf.c
diff --git
a/src/simix/smx_smurf.c
b/src/simix/smx_smurf.c
index
91c67a4
..
0ef4ca3
100644
(file)
--- a/
src/simix/smx_smurf.c
+++ b/
src/simix/smx_smurf.c
@@
-198,7
+198,7
@@
void SIMIX_simcall_pre(smx_simcall_t simcall, int value)
SIMIX_simcall_answer(simcall);
break;
SIMIX_simcall_answer(simcall);
break;
- case SIMCALL_RDV_GE
Y
_BY_NAME:
+ case SIMCALL_RDV_GE
T
_BY_NAME:
simcall->rdv_get_by_name.result =
SIMIX_rdv_get_by_name(simcall->rdv_get_by_name.name);
SIMIX_simcall_answer(simcall);
simcall->rdv_get_by_name.result =
SIMIX_rdv_get_by_name(simcall->rdv_get_by_name.name);
SIMIX_simcall_answer(simcall);
@@
-623,7
+623,13
@@
void SIMIX_simcall_post(smx_action_t action)
/* FIXME: add types for every simcall */
const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p" };
/* FIXME: add types for every simcall */
const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p" };
-simcall_handler_t simcall_table[NUM_SIMCALLS] = {[SIMCALL_HOST_EXECUTE] = &SIMIX_host_execute};
+simcall_handler_t simcall_table[NUM_SIMCALLS] = {
+#undef SIMCALL_ENUM_ELEMENT
+#define SIMCALL_ENUM_ELEMENT(x,y) &y /* generate strings from the enumeration values */
+SIMCALL_LIST
+#undef SIMCALL_ENUM_ELEMENT
+};
+
void SIMIX_simcall_typecheck(const char *fmt, ...)
{
void SIMIX_simcall_typecheck(const char *fmt, ...)
{