1 #include <stdio.h> 2 #include <unistd.h> 3 #include <vm_main.h> 4 #include <vm_payload.h> 5 AVmPayload_main()6extern "C" int AVmPayload_main() { 7 // disable buffering to communicate seamlessly 8 setvbuf(stdin, nullptr, _IONBF, 0); 9 setvbuf(stdout, nullptr, _IONBF, 0); 10 setvbuf(stderr, nullptr, _IONBF, 0); 11 12 printf("Hello Microdroid\n"); 13 14 AVmPayload_notifyPayloadReady(); 15 16 // Wait forever to allow developer to interact with Microdroid shell 17 for (;;) { 18 pause(); 19 } 20 21 return 0; 22 } 23