XBT_PUBLIC void SIMIX_process_throw(smx_actor_t process, xbt_errcat_t cat, int value, const char* mesg);
/* Process handling */
-XBT_PUBLIC void simcall_process_cleanup(smx_actor_t process);
XBT_PUBLIC void simcall_process_suspend(smx_actor_t process);
/* Getters and Setters */
this->process_->suspended = 0;
this->iwannadie = false;
- simcall_process_cleanup(this->process_);
+ simgrid::simix::kernelImmediate([this] { SIMIX_process_cleanup(this->process_); });
this->iwannadie = true;
}
simcall_BODY_process_killall();
}
-/**
- * \ingroup simix_process_management
- * \brief Cleans up a SIMIX process.
- * \param process poor victim (must have already been killed)
- */
-void simcall_process_cleanup(smx_actor_t process)
-{
- simcall_BODY_process_cleanup(process);
-}
-
void simcall_process_join(smx_actor_t process, double timeout)
{
simcall_BODY_process_join(process, timeout);
*/
#include "src/simix/popping_private.hpp"
-static inline smx_actor_t simcall_process_cleanup__get__process(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
-}
-static inline smx_actor_t simcall_process_cleanup__getraw__process(smx_simcall_t simcall)
-{
- return simgrid::simix::unmarshal_raw<smx_actor_t>(simcall->args[0]);
-}
-static inline void simcall_process_cleanup__set__process(smx_simcall_t simcall, smx_actor_t arg)
-{
- simgrid::simix::marshal<smx_actor_t>(simcall->args[0], arg);
-}
-
static inline smx_actor_t simcall_process_suspend__get__process(smx_simcall_t simcall)
{
return simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]);
return simcall<void>(SIMCALL_PROCESS_KILLALL);
}
-inline static void simcall_BODY_process_cleanup(smx_actor_t process)
-{
- if (0) /* Go to that function to follow the code flow through the simcall barrier */
- SIMIX_process_cleanup(process);
- return simcall<void, smx_actor_t>(SIMCALL_PROCESS_CLEANUP, process);
-}
-
inline static void simcall_BODY_process_suspend(smx_actor_t process)
{
if (0) /* Go to that function to follow the code flow through the simcall barrier */
typedef enum {
SIMCALL_NONE,
SIMCALL_PROCESS_KILLALL,
- SIMCALL_PROCESS_CLEANUP,
SIMCALL_PROCESS_SUSPEND,
SIMCALL_PROCESS_JOIN,
SIMCALL_PROCESS_SLEEP,
const char* simcall_names[] = {
"SIMCALL_NONE",
"SIMCALL_PROCESS_KILLALL",
- "SIMCALL_PROCESS_CLEANUP",
"SIMCALL_PROCESS_SUSPEND",
"SIMCALL_PROCESS_JOIN",
"SIMCALL_PROCESS_SLEEP",
void SIMIX_simcall_handle(smx_simcall_t simcall, int value) {
XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));
SIMCALL_SET_MC_VALUE(simcall, value);
- if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)
+ if (simcall->issuer->context->iwannadie)
return;
switch (simcall->call) {
case SIMCALL_PROCESS_KILLALL:
SIMIX_simcall_answer(simcall);
break;
-case SIMCALL_PROCESS_CLEANUP:
- SIMIX_process_cleanup(simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
- SIMIX_simcall_answer(simcall);
- break;
-
case SIMCALL_PROCESS_SUSPEND:
simcall_HANDLER_process_suspend(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
break;
# ./include/simgrid/simix.h (otherwise you will get a warning at compile time)
void process_killall();
-void process_cleanup(smx_actor_t process) [[nohandler]];
void process_suspend(smx_actor_t process) [[block]];
int process_join(smx_actor_t process, double timeout) [[block]];
int process_sleep(double duration) [[block]];
' XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));\n')
fd.write(' SIMCALL_SET_MC_VALUE(simcall, value);\n')
fd.write(
- ' if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)\n')
+ ' if (simcall->issuer->context->iwannadie)\n')
fd.write(' return;\n')
fd.write(' switch (simcall->call) {\n')