summaryrefslogtreecommitdiff
path: root/retro_emu_thread.h
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-03-08 18:44:03 +0100
committerDavid Guillen Fandos2021-03-08 18:44:03 +0100
commit56dc6ecb70e6fc76d32d6a7194acb273b76bfe0e (patch)
treecf3b14a8d1bc593248398d0c544251ea8987b40e /retro_emu_thread.h
parent02e35339ee89f92d346d290c24497bbbae59ea79 (diff)
downloadpicogpsp-56dc6ecb70e6fc76d32d6a7194acb273b76bfe0e.tar.gz
picogpsp-56dc6ecb70e6fc76d32d6a7194acb273b76bfe0e.tar.bz2
picogpsp-56dc6ecb70e6fc76d32d6a7194acb273b76bfe0e.zip
Remove libco
This removes libco and all the usages of it (+pthreads). Rewired all dynarecs and interpreter to return after every frame so that libretro can process events. This required to make dynarec re-entrant. Dynarecs were updated to check for new frame on every update (IRQ, cycle exhaustion, I/O write, etc). The performance impact of doing so should be minimal (and definitely outweight the libco gains). While at it, fixed small issues to get a bit more perf: arm dynarec was not idling correctly, mips was using stack when not needed, etc. Tested on PSP (mips), OGA (armv7), Linux (x86 and interpreter). Not tested on Android though.
Diffstat (limited to 'retro_emu_thread.h')
-rw-r--r--retro_emu_thread.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/retro_emu_thread.h b/retro_emu_thread.h
deleted file mode 100644
index 472ae8b..0000000
--- a/retro_emu_thread.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef EMU_THREAD_H
-#define EMU_THREAD_H
-
-#include "common.h"
-
-/* gpSP doesn't have a top-level main loop that we can use, so instead we run it in its own thread
- * and switch between it and the main thread. Calling this function will block the current thread
- * and unblock the other.
- *
- * This function can be called from either the main or the emulation thread.
- */
-void retro_switch_thread(void);
-
-/* Initialize the emulation thread and any related resources.
- *
- * Only call this function from the main thread.
- */
-bool retro_init_emu_thread(bool dynarec, u32 cycles);
-
-/* Destroy the emulation thread and any related resources. Only call this after the emulation thread
- * has finished (or canceled) and joined.
- *
- * Only call this function from the main thread.
- */
-void retro_deinit_emu_thread(void);
-
-/* Returns true if the emulation thread was initialized successfully.
- *
- * This function can be called from either the main or the emulation thread.
- */
-bool retro_is_emu_thread_initialized(void);
-
-/* Join the emulation thread. The thread must have exited naturally or been canceled.
- *
- * Only call this function from the main thread.
- */
-void retro_join_emu_thread(void);
-
-/* Cancel the emulation thread.
- *
- * Only call this function from the main thread.
- */
-void retro_cancel_emu_thread(void);
-
-/* Returns true if the emulation thread has exited naturally.
- *
- * This function can be called from either the main or the emulation thread.
- */
-bool retro_emu_thread_exited(void);
-
-#endif