qemu-main.h 892 B

1234567891011121314151617181920212223
  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. * The function to run on the main (initial) thread of the process.
  9. * NULL means QEMU's main event loop.
  10. * When non-NULL, QEMU's main event loop will run on a purposely created
  11. * thread, after which the provided function pointer will be invoked on
  12. * the initial thread.
  13. * This is useful on platforms which treat the main thread as special
  14. * (macOS/Darwin) and/or require all UI API calls to occur from the main
  15. * thread. Those platforms can initialise it to a specific function,
  16. * while UI implementations may reset it to NULL during their init if they
  17. * will handle system and UI events on the main thread via QEMU's own main
  18. * event loop.
  19. */
  20. extern int (*qemu_main)(void);
  21. #endif /* QEMU_MAIN_H */