X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/217557096673710f29ebe590ffcf76329ddd87de..f9d7b35c174d52377ef297f786129e0340ae0778:/src/simix/popping_bodies.cpp?ds=sidebyside diff --git a/src/simix/popping_bodies.cpp b/src/simix/popping_bodies.cpp index 2d3e86d278..1c50638101 100644 --- a/src/simix/popping_bodies.cpp +++ b/src/simix/popping_bodies.cpp @@ -16,6 +16,7 @@ #include "smx_private.h" #include "src/mc/mc_forward.h" #include "xbt/ex.h" +#include inline static void simcall_BODY_host_on(sg_host_t host) { smx_process_t self = SIMIX_process_self(); @@ -2530,6 +2531,27 @@ inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* } } + +inline static void simcall_BODY_run_kernel(void* code) { + smx_process_t self = SIMIX_process_self(); + + /* Go to that function to follow the code flow through the simcall barrier */ + if (0) SIMIX_run_kernel(code); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + + self->simcall.call = SIMCALL_RUN_KERNEL; + memset(&self->simcall.result, 0, sizeof(self->simcall.result)); + memset(self->simcall.args, 0, sizeof(self->simcall.args)); + self->simcall.args[0].dp = (void*) code; + 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_handle(&self->simcall, 0); + } + + } #ifdef HAVE_LATENCY_BOUND_TRACKING inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {