1 /* 2 * This work is licensed under the terms of the GNU GPL, version 2 or later. 3 * See the COPYING file in the top-level directory. 4 */ 5 #ifndef QEMU_MAIN_H 6 #define QEMU_MAIN_H 7 8 /* 9 * The function to run on the main (initial) thread of the process. 10 * NULL means QEMU's main event loop. 11 * When non-NULL, QEMU's main event loop will run on a purposely created 12 * thread, after which the provided function pointer will be invoked on 13 * the initial thread. 14 * This is useful on platforms which treat the main thread as special 15 * (macOS/Darwin) and/or require all UI API calls to occur from the main 16 * thread. Those platforms can initialise it to a specific function, 17 * while UI implementations may reset it to NULL during their init if they 18 * will handle system and UI events on the main thread via QEMU's own main 19 * event loop. 20 */ 21 extern int (*qemu_main)(void); 22 23 #endif /* QEMU_MAIN_H */ 24