- void_f_pvoid_t cleanup_func, void* cleanup_arg)
-{
- smx_ctx_lua_t context = xbt_new0(s_smx_ctx_lua_t, 1);
-
- /* If the user provided a function for the process then use it
- otherwise is the context for maestro */
- if(code){
- context->code = code;
- context->state = lua_newthread(lua_state);
-
- context->ref = luaL_ref(lua_state, LUA_REGISTRYINDEX);
- //lua_pop(lua_state,1);
-
- context->argc = argc;
- context->argv = argv;
- context->cleanup_func = cleanup_func;
- context->cleanup_arg = cleanup_arg;
- INFO1("Created context for function %s",argv[0]);
- } else {
- INFO0("Created context for maestro");
- }
-
- return (smx_context_t)context;
-}
-
-static void smx_ctx_lua_free(smx_context_t pcontext)
-{
- int i;
- smx_ctx_lua_t context = (smx_ctx_lua_t)pcontext;
- if (context){