Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill MSG_WARNING and MSG_FATAL return codes
[simgrid.git] / src / simix / smx_context_ruby.c
index 112ca36..3427d87 100644 (file)
@@ -23,8 +23,7 @@ static int smx_ctx_ruby_factory_finalize(smx_context_factory_t *factory);
 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 old_context,smx_context_t new_context);
+static void smx_ctx_ruby_resume(smx_context_t new_context);
 static void smx_ctx_ruby_wrapper(void); 
 
 
@@ -57,11 +56,11 @@ smx_ctx_ruby_create_context(xbt_main_func_t code,int argc,char** argv,
   /* if the user provided a function for the process , then use it
      Otherwise it's the context for maestro */
   if (code) {
-    context->cleanup_func = cleanup_func;
-    context->cleanup_arg = cleanup_arg;
+    context->super.cleanup_func = cleanup_func;
+    context->super.cleanup_arg = cleanup_arg;
     context->process = (VALUE)code;
-    context->argc=argc;
-    context->argv=argv;
+    context->super.argc=argc;
+    context->super.argv=argv;
 
     DEBUG1("smx_ctx_ruby_create_context(%s)...Done",argv[0]);
   }
@@ -125,9 +124,8 @@ static void smx_ctx_ruby_suspend(smx_context_t context) {
       rb_process_unschedule(ctx_ruby->process);
 }
 
-static void smx_ctx_ruby_resume(smx_context_t old_context,smx_context_t new_context) {
-  DEBUG2("smx_ctx_ruby_resume(%s,%s)",
-      (old_context->argc?old_context->argv[0]:"maestro"),
+static void smx_ctx_ruby_resume(smx_context_t new_context) {
+  DEBUG1("smx_ctx_ruby_resume(%s)",
       (new_context->argc?new_context->argv[0]:"maestro"));
 
   smx_ctx_ruby_t ctx_ruby = (smx_ctx_ruby_t) new_context;