if (category == nullptr) {
return;
}
- simcall_BODY_set_category(synchro, category);
+ simgrid::simix::kernelImmediate([synchro, category] { SIMIX_set_category(synchro, category); });
}
/**
simgrid::simix::marshal<int>(simcall->result, result);
}
-static inline boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_set_category__get__synchro(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]);
-}
-static inline simgrid::kernel::activity::ActivityImpl* simcall_set_category__getraw__synchro(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ActivityImpl*>(simcall->args[0]);
-}
-static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> arg)
-{
- simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0], arg);
-}
-static inline const char* simcall_set_category__get__category(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<const char*>(simcall->args[1]);
-}
-static inline const char* simcall_set_category__getraw__category(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<const char*>(simcall->args[1]);
-}
-static inline void simcall_set_category__set__category(smx_simcall_t simcall, const char* arg)
-{
- simgrid::simix::marshal<const char*>(simcall->args[1], arg);
-}
-
static inline std::function<void()> const* simcall_run_kernel__get__code(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]);
return simcall<int, int, int>(SIMCALL_MC_RANDOM, min, max);
}
-inline static void simcall_BODY_set_category(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> synchro, const char* category)
-{
- if (0) /* Go to that function to follow the code flow through the simcall barrier */
- SIMIX_set_category(synchro, category);
- return simcall<void, boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, const char*>(SIMCALL_SET_CATEGORY, synchro, category);
-}
-
inline static void simcall_BODY_run_kernel(std::function<void()> const* code)
{
if (0) /* Go to that function to follow the code flow through the simcall barrier */
SIMCALL_STORAGE_READ,
SIMCALL_STORAGE_WRITE,
SIMCALL_MC_RANDOM,
- SIMCALL_SET_CATEGORY,
SIMCALL_RUN_KERNEL,
SIMCALL_RUN_BLOCKING,
NUM_SIMCALLS
"SIMCALL_STORAGE_READ",
"SIMCALL_STORAGE_WRITE",
"SIMCALL_MC_RANDOM",
- "SIMCALL_SET_CATEGORY",
"SIMCALL_RUN_KERNEL",
"SIMCALL_RUN_BLOCKING",
};
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_SET_CATEGORY:
- SIMIX_set_category(simgrid::simix::unmarshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->args[0]), simgrid::simix::unmarshal<const char*>(simcall->args[1]));
- SIMIX_simcall_answer(simcall);
- break;
-
case SIMCALL_RUN_KERNEL:
SIMIX_run_kernel(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
SIMIX_simcall_answer(simcall);
sg_size_t storage_write(surf_storage_t st, sg_size_t size) [[block]];
int mc_random(int min, int max);
-void set_category(boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> synchro, const char* category) [[nohandler]];
void run_kernel(std::function<void()> const* code) [[nohandler]];
void run_blocking(std::function<void()> const* code) [[block,nohandler]];