mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2025-01-09 11:09:22 +01:00
Simplify trampoline reset, flush cache
This commit is contained in:
parent
f5d4536d42
commit
70ac37040e
@ -28,6 +28,7 @@
|
||||
#include <coreinit/interrupts.h>
|
||||
#include <coreinit/scheduler.h>
|
||||
|
||||
#include <coreinit/cache.h>
|
||||
#include <thread>
|
||||
|
||||
WUMS_MODULE_EXPORT_NAME("homebrew_wupsbackend");
|
||||
@ -309,9 +310,12 @@ void CleanupPlugins(std::vector<PluginContainer> &&pluginsToDeinit) {
|
||||
if (!pluginContainer.isLinkedAndLoaded() || cur.id != pluginContainer.getPluginLinkInformation().getTrampolineId()) {
|
||||
continue;
|
||||
}
|
||||
cur.status = RELOC_TRAMP_FREE;
|
||||
cur = {};
|
||||
}
|
||||
}
|
||||
DCFlushRange((void *) gTrampData.data(), gTrampData.size() * sizeof(relocation_trampoline_entry_t));
|
||||
ICInvalidateRange((void *) gTrampData.data(), gTrampData.size() * sizeof(relocation_trampoline_entry_t));
|
||||
OSMemoryBarrier();
|
||||
}
|
||||
void CheckCleanupCallbackUsage(const std::vector<PluginContainer> &plugins) {
|
||||
auto *curThread = OSGetCurrentThread();
|
||||
|
Loading…
x
Reference in New Issue
Block a user