blob: 2ee83bedff30bc5cf4ce6b7f16d32872149eba03 [file] [log] [blame]
Marc-André Lureau88c39c82022-04-20 17:25:47 +04001/*
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
Phil Dennis-Jordanf5ab12c2024-10-24 12:27:59 +02008/*
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 */
Akihiko Odakibab6a302022-08-19 22:27:54 +090021extern int (*qemu_main)(void);
Marc-André Lureau88c39c82022-04-20 17:25:47 +040022
23#endif /* QEMU_MAIN_H */