X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b1a2e45431d13cdf45ec8b1c91bf7d6ca8377c9d..e5487aa8732f87d753fd97a8968006950717d894:/src/simix/smx_context_ruby.c diff --git a/src/simix/smx_context_ruby.c b/src/simix/smx_context_ruby.c index f19fbccdff..f3361d11c8 100644 --- a/src/simix/smx_context_ruby.c +++ b/src/simix/smx_context_ruby.c @@ -1,6 +1,7 @@ /* context_Ruby - implementation of context switching with/for ruby */ -/* Copyright (c) 2010, the SimGrid team. All right reserved. */ +/* Copyright (c) 2010. The SimGrid Team. + * All rights reserved. */ /* 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. */ @@ -19,7 +20,6 @@ static smx_context_t 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); @@ -31,7 +31,7 @@ void SIMIX_ctx_ruby_factory_init(smx_context_factory_t *factory) { (*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; @@ -57,20 +57,12 @@ smx_ctx_ruby_create_context(xbt_main_func_t code,int argc,char** argv, 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;