/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "private.h"
#include "xbt/function_types.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "xbt/asserts.h"
+#include "smx_context_private.h"
#include "bindings/ruby_bindings.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(ruby);
smx_ctx_ruby_create_context(xbt_main_func_t code,int argc,char** argv,
void_f_pvoid_t cleanup_func,void *cleanup_arg);
-static void smx_ctx_ruby_free(smx_context_t context);
static void smx_ctx_ruby_stop(smx_context_t context);
static void smx_ctx_ruby_suspend(smx_context_t context);
static void smx_ctx_ruby_resume(smx_context_t new_context);
(*factory)->create_context = smx_ctx_ruby_create_context;
/* Do not overload that method (*factory)->finalize */
- (*factory)->free = smx_ctx_ruby_free;
+ /* Do not overload that method (*factory)->free */
(*factory)->stop = smx_ctx_ruby_stop;
(*factory)->suspend = smx_ctx_ruby_suspend;
(*factory)->resume = smx_ctx_ruby_resume;
return (smx_context_t) context;
}
-static void smx_ctx_ruby_free(smx_context_t context) {
- if (context)
- DEBUG1("smx_ctx_ruby_free_context(%p)",context);
-
- smx_ctx_base_free(context);
-}
-
static void smx_ctx_ruby_stop(smx_context_t context) {
DEBUG0("smx_ctx_ruby_stop()");
VALUE process = Qnil;
smx_ctx_ruby_t ctx_ruby,current;
- if ( context->cleanup_func)
- (*(context->cleanup_func)) (context->cleanup_arg);
+ smx_ctx_base_stop(context);
ctx_ruby = (smx_ctx_ruby_t) context;