MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / main

Function main

test/module/test_stdin.cpp:57–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57int main(int argc, char const *argv[]) {
58 // SM shell doesn't implement an event loop and therefore doesn't support
59 // emscripten_set_main_loop. However, its stdin reads are sync so it
60 // should exit out after calling main_loop once.
61 main_loop();
62
63#ifdef __EMSCRIPTEN__
64 emscripten_set_main_loop(main_loop, 60, 0);
65#else
66 while (1) main_loop(); sleep(1);
67#endif
68 return 0;
69}

Callers

nothing calls this directly

Calls 2

main_loopFunction · 0.70
sleepFunction · 0.50

Tested by

no test coverage detected