- context->code = code;
- context->argc = argc;
- context->argv = argv;
- context->cleanup_func = cleanup_func;
- context->cleanup_arg = cleanup_arg;
- context->begin = xbt_os_sem_init(0);
- context->end = xbt_os_sem_init(0);
-
+ /* If the user provided a function for the process then use it
+ otherwise is the context for maestro */
+ if(code){
+ context->code = code;
+ context->argc = argc;
+ context->argv = argv;
+ context->cleanup_func = cleanup_func;
+ context->cleanup_arg = cleanup_arg;
+ context->begin = xbt_os_sem_init(0);
+ context->end = xbt_os_sem_init(0);
+ }
+