X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cc375ad134c19925e1e343bae932be21cf8a8caf..a243b4c3535f516d05259cac06963c422d4aadc0:/src/bindings/lua/simgrid_lua.c diff --git a/src/bindings/lua/simgrid_lua.c b/src/bindings/lua/simgrid_lua.c index 748a9bf8f8..db5f4e0cb1 100644 --- a/src/bindings/lua/simgrid_lua.c +++ b/src/bindings/lua/simgrid_lua.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2010. The SimGrid Team. +/* Copyright (c) 2010-2013. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -148,7 +148,7 @@ static int sd_register_platform(lua_State * L) } /** - * Register applicaiton for MSG + * Register application for MSG */ static int msg_register_application(lua_State * L) { @@ -158,6 +158,13 @@ static int msg_register_application(lua_State * L) return 0; } +static int console_init_application(lua_State *L) { + MSG_function_register_default(run_lua_code); + SIMIX_init_application(); + return 0; +} + + static const luaL_Reg simgrid_functions[] = { {"create_environment", create_environment}, {"launch_application", launch_application}, @@ -172,6 +179,7 @@ static const luaL_Reg simgrid_functions[] = { {"msg_register_platform", msg_register_platform}, {"sd_register_platform", sd_register_platform}, {"msg_register_application", msg_register_application}, + {"init_application", console_init_application}, {NULL, NULL} };