diff --git a/apps/main.cpp b/apps/main.cpp index 6421fa7e6..45d19b249 100644 --- a/apps/main.cpp +++ b/apps/main.cpp @@ -2,6 +2,6 @@ AppsContainerStorage container; -void ion_app() { +void ion_main(int argc, char * argv[]) { container.run(); } diff --git a/build/toolchain.emscripten.mak b/build/toolchain.emscripten.mak index 9ed787dff..49e4ecabd 100644 --- a/build/toolchain.emscripten.mak +++ b/build/toolchain.emscripten.mak @@ -25,7 +25,7 @@ __ZN7RunLoop8runWhileEPFbPvES0_ \ __ZN7RunLoop3runEv \ __ZN9Container3runEv \ __ZN13AppsContainer3runEv \ -__Z7ion_appv \ +__Z8ion_mainiPPc \ _mp_execute_bytecode \ _fun_bc_call \ _mp_call_function_0 \ diff --git a/ion/include/ion.h b/ion/include/ion.h index 3f2ad9645..772853557 100644 --- a/ion/include/ion.h +++ b/ion/include/ion.h @@ -18,9 +18,9 @@ * will take care of configuring the whole environment for you. In POSIX terms, * ION will implement the "main" function. * Don't worry though, once all its initialization will be performed, ION will - * jump to your code at ion_app, which you have to implement yourself. */ + * jump to your code at ion_main, which you have to implement yourself. */ -void ion_app(); +void ion_main(int argc, char * argv[]); namespace Ion { diff --git a/ion/src/blackbox/boot.cpp b/ion/src/blackbox/boot.cpp index 2de302982..e94bc1851 100644 --- a/ion/src/blackbox/boot.cpp +++ b/ion/src/blackbox/boot.cpp @@ -20,6 +20,6 @@ int main(int argc, char * argv[]) { } } signal(SIGABRT, Ion::Events::Blackbox::dumpEventCount); - ion_app(); + ion_main(argc, argv); return 0; } diff --git a/ion/src/device/boot/rt0.cpp b/ion/src/device/boot/rt0.cpp index 89924814c..678d7940b 100644 --- a/ion/src/device/boot/rt0.cpp +++ b/ion/src/device/boot/rt0.cpp @@ -61,7 +61,7 @@ void start() { Ion::Device::init(); - ion_app(); + ion_main(0, nullptr); abort(); } diff --git a/ion/src/emscripten/main.cpp b/ion/src/emscripten/main.cpp index 7f5674a32..0fd4066f4 100644 --- a/ion/src/emscripten/main.cpp +++ b/ion/src/emscripten/main.cpp @@ -17,8 +17,7 @@ int main(int argc, char * argv[]) { } } } - - ion_app(); + ion_main(argc, argv); return 0; } diff --git a/ion/src/simulator/boot/main.cpp b/ion/src/simulator/boot/main.cpp index 6def8c345..f009afc57 100644 --- a/ion/src/simulator/boot/main.cpp +++ b/ion/src/simulator/boot/main.cpp @@ -3,5 +3,5 @@ int main(int argc, char * argv[]) { init_platform(); - ion_app(); + ion_main(argc, argv); } diff --git a/quiz/src/runner.cpp b/quiz/src/runner.cpp index b55caeb98..fa266a8fe 100644 --- a/quiz/src/runner.cpp +++ b/quiz/src/runner.cpp @@ -20,7 +20,7 @@ void quiz_print(const char * message) { #endif } -void ion_app() { +void ion_main(int argc, char * argv[]) { int i = 0; while (quiz_cases[i] != NULL) { QuizCase c = quiz_cases[i];