Commit Graph
27 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
Henrik Rydgård c19acc0fd8 When loading plugins, show the plugin name, not the filename.
Fixes #21495
2026-05-02 11:07:34 +02:00
Henrik Rydgård eca6f98a53 Register another function in ModuleMgrForKernel. Logging cleanup 2026-04-14 12:41:14 -06:00
Henrik Rydgård 14ddad5ce3 Change how defaults work in the inifile reader (more flexible this way) 2025-10-31 21:57:52 +01:00
Katharine Chui 326448636b Run module_start of plugins before starting boot module 2025-06-13 23:29:49 +02:00
Henrik Rydgård cdbc7176d8 Refactor logging in sceKernelStartModule 2025-01-19 11:38:46 +01:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Henrik Rydgård 4b34e4cfb4 Add option to disable plugins completely 2024-04-09 13:13:30 +02: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 c0bc6446dd Improve assert, cleanup 2024-02-01 16:33:01 +01:00
Herman Semenov 2a31f8c6c0 [Common/Core/HLE] Object out of scope optimization for better codegeneration (lower level scope) 2023-12-20 12:33:56 +03:00
Henrik Rydgård 844637f9d7 Add a notification when loading a prx plugin 2023-12-13 19:10:15 +01:00
Katharine Chui 030a031943 allow ALL = true then gameID = false blacklisting 2023-11-11 20:43:46 +08: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 d376e67f87 Common: Cleanup some Path constructions. 2021-05-14 22:48:04 -07:00
Henrik Rydgård ae06499a0c Change Copy, Rename to use Path. Remove std::string version of Exists().
Buildfixes

Buildfix
2021-05-13 10:39:16 +02:00
Henrik Rydgård 025bcb1673 Introduce Path, start using it all over the place.
Still lots left to convert!

Convert GetSysDirectory to return Path.

More buildfixing

Remove unnecessary Path( constructors
2021-05-13 10:39:16 +02:00
Henrik Rydgård 08843673d9 Rename a couple of functions. 2021-04-25 20:39:32 +02:00
Henrik Rydgård 1b13badeb4 Move remaining FileUtil functions into the File namespace. 2021-04-25 20:38:22 +02:00
Henrik Rydgård 4f43cff5ca Move fileutil, net, image loaders, ui to Common. (#13506)
* Move and rename file_util/fd_util to Common/File/FileUtil and DirListing

Let's also move net while we're at it.

Move the ZIM/PNG loaders over to Common.

Move the UI framework into Common

iOS buildfix

* Buildfix

* Buildfixes

* Apple buildfix

* This typo again..

* UWP buildfix

* Fix build of PPSSPPQt, such as it is (it's not in good condition...)

* Guess what? Another buildfix.
2020-10-04 20:48:47 +02:00
Henrik Rydgård 9e41fafd0d Move math and some file and data conversion files out from native to Common.
Buildfixing

Move some file util files

Buildfix

Move KeyMap.cpp/h to Core where they belong better.

libretro buildfix attempt

Move ini_file

More buildfixes
2020-10-04 09:12:46 +02:00
Unknown W. Brackets ac7522b0dd Plugins: Schedule plugins before game thread. 2020-09-08 09:31:09 -07:00
Unknown W. Brackets 2f4945aad8 Plugins: Oops, typo. 2020-09-08 09:12:19 -07:00
Unknown W. Brackets e383b0279f Plugins: Support for loading game-specific plugins. 2020-09-08 09:12:19 -07:00