-/* Copyright (c) 2010. The SimGrid Team.
+/* Copyright (c) 2010-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "lua_utils.h"
#include "xbt.h"
#include "msg/msg.h"
-#include "simdag/simdag.h"
+#include "simgrid/simdag.h"
#include "surf/surfxml_parse.h"
#include <lauxlib.h>
}
/**
- * Register applicaiton for MSG
+ * Register application for MSG
*/
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},
{"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}
};