From: Cristian Rosa Date: Fri, 7 Sep 2012 13:59:04 +0000 (-0300) Subject: Move SIMCALL_HOST_EXECUTE to the new simcall architecture for initial testing. X-Git-Tag: v3_9_rc1~86^2~237^2~10 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2f4b693b1235e1d82f41a1639046c3ac66063fba Move SIMCALL_HOST_EXECUTE to the new simcall architecture for initial testing. --- diff --git a/src/simix/smx_smurf.c b/src/simix/smx_smurf.c index 691dc6246f..0f1bdfb609 100644 --- a/src/simix/smx_smurf.c +++ b/src/simix/smx_smurf.c @@ -656,10 +656,28 @@ void __SIMIX_simcall(e_smx_simcall_t simcall_id, u_smx_scalar_t *args) /* New Simcal interface */ /* FIXME: add types for every simcall */ -const char *simcall_types[NUM_SIMCALLS] = {"%d", "%d%f", "%l"}; +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}; void SIMIX_simcall_typecheck(const char *fmt, ...) { return; } +void __SIMIX_simcall(e_smx_simcall_t simcall_id, u_smx_scalar_t *args) +{ + smx_process_t self = SIMIX_process_self(); + self->simcall.call = simcall_id; + self->simcall.args = args; + + if (self != simix_global->maestro_process) { + XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, + SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); + + SIMIX_process_yield(self); + } else { + + SIMIX_simcall_pre(&self->simcall, 0); + } +}