Commit Graph
10 Commits
Author SHA1 Message Date
libretroadmin f1208a7a5a Make threading lock-free
The core and the headless tools no longer use mutexes, condition variables,
spinlocks, std::atomic, std::thread or volatile flags. Threads hand off through
libretro-common's retro_atomic and rthreads plus a few small pieces on top of
them in Common/Thread: Thread, MpscQueue, EventCounter, ParkingLot waits and
ReaderGate. Every wait blocks until it's woken; nothing polls on a timer.

State that only one thread touches just loses its lock. The PSP filesystem,
sceIo and the savedata dialog now belong to the emulation thread: async reads
and writes run when they're queued and complete later in emulated time, and
the IO and savedata threads are gone. The friend finder only talks to the
adhoc server and hands what it gets to the emulation thread. GPU init always
runs on the thread that starts the game.

The Vulkan render and compile queues, pipeline and render pass caches, delete
list and SPIR-V cache, the GL render queue, the software renderer's jit caches,
the file loader caches, the web debugger, UPnP, input, savestates, logging and
the GE debugger all hand off through queues and atomics. The IR jit's spinning
profiler thread goes.

A CPU thread with nothing to run now sleeps until work is queued instead of
spinning. Headless with --debugger waits for a client while stopped, and ends
the run once every client that connected has left. Web server shutdown keeps
servicing the CPU queue until the server has finished.
2026-10-09 04:56:16 +02:00
Katharine Chui 326448636b Run module_start of plugins before starting boot module 2025-06-13 23:29:49 +02:00
Henrik Rydgård 3e198c53b2 More include cleanup 2024-12-18 13:57:26 +01:00
Henrik Rydgård e903287f4c Game info screen: Show list of any plugins that will be loaded on start of the game 2024-04-09 12:55:50 +02:00
Henrik Rydgård 2c35c351f2 Lock around plugin key data, don't set it unless a plugin is enabled 2023-05-01 12:56:27 +02:00
Henrik Rydgård 15a0474d40 NativeKey: Only update the HLEPlugins key map if any plugins are active. 2023-05-01 12:16:45 +02:00
Sergey P 64f1e5ed61 range checks 2023-02-01 13:26:17 +03:00
ThirteenAG 5e5bffc808 remade into GET_AXIS/GET_VKEY apis 2022-12-05 14:46:00 +03:00
Unknown W. Brackets ac7522b0dd Plugins: Schedule plugins before game thread. 2020-09-08 09:31:09 -07:00
Unknown W. Brackets e383b0279f Plugins: Support for loading game-specific plugins. 2020-09-08 09:12:19 -07:00