Example #1
0
static void smx_ctx_sysv_free(smx_context_t context)
{

  if (context) {
    SIMIX_context_stack_delete(((smx_ctx_sysv_t)context)->stack);
  }
  smx_ctx_base_free(context);
}
Example #2
0
static void smx_ctx_cojava_free(smx_context_t context)
{
  if (context) {
    smx_ctx_cojava_t ctx_java = (smx_ctx_cojava_t) context;
    if (ctx_java->jcoroutine) { /* We are not in maestro context */
      JNIEnv *env = get_current_thread_env();
      (*env)->DeleteGlobalRef(env, ctx_java->jcoroutine);
      (*env)->DeleteGlobalRef(env, ctx_java->jprocess);
    }
  }
  smx_ctx_base_free(context);
}
Example #3
0
static void smx_ctx_sysv_free(smx_context_t context)
{

  if (context) {

#ifdef HAVE_VALGRIND_VALGRIND_H
    VALGRIND_STACK_DEREGISTER(((smx_ctx_sysv_t)
                               context)->valgrind_stack_id);
#endif                          /* HAVE_VALGRIND_VALGRIND_H */

  }
  smx_ctx_base_free(context);
}
Example #4
0
static void smx_ctx_boost_free(smx_context_t c)
{
  smx_ctx_boost_t context = (smx_ctx_boost_t) c;
  if (!context)
    return;
#if HAVE_BOOST_CONTEXT == 1
  if (!context->stack)
    delete context->fc;
#endif
  if ((smx_ctx_boost_t) c == boost_maestro_context)
    boost_maestro_context = nullptr;
  SIMIX_context_stack_delete(context->stack);
  smx_ctx_base_free(c);
}