- smx_ctx_ruby_create_context(xbt_main_func_t code,int argc,char** argv,
- void_f_pvoid_t cleanup_func,void* cleanup_arg)
-{
-
- smx_ctx_ruby_t context = xbt_new0(s_smx_ctx_ruby_t,1);
-
- /*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->process = (VALUE)code;
-
- #ifdef MY_DEBUG
- printf("smx_ctx_ruby_create_context...Done\n");
- #endif
-
+smx_ctx_ruby_create_context(xbt_main_func_t code,int argc,char** argv,
+ void_f_pvoid_t cleanup_func,void* cleanup_arg) {
+
+ smx_ctx_ruby_t context = (smx_ctx_ruby_t)smx_ctx_base_factory_create_context_sized
+ (sizeof(s_smx_ctx_ruby_t), code,argc,argv,cleanup_func,cleanup_arg);
+
+ /* if the user provided a function for the process , then use it
+ Otherwise it's the context for maestro */
+ if (code) {
+ context->process = (VALUE)code;
+
+ DEBUG1("smx_ctx_ruby_create_context(%s)...Done",argv[0]);