mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 03:35:19 +02:00
Use a custom RA for module funcs. Not used yet.
But it will be.
This commit is contained in:
@@ -19,7 +19,8 @@
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
#include "HLE.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/HLETables.h"
|
||||
#include "Core/Reporting.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "../Host.h"
|
||||
@@ -869,8 +870,11 @@ void __KernelStartModule(Module *m, int args, const char *argp, SceKernelSMOptio
|
||||
WARN_LOG_REPORT(LOADER, "Main module has start func (%08x) different from entry (%08x)?", m->nm.module_start_func, m->nm.entry_addr);
|
||||
}
|
||||
|
||||
__KernelSetupRootThread(m->GetUID(), args, argp, options->priority, options->stacksize, options->attribute);
|
||||
//TODO: if current thread, put it in wait state, waiting for the new thread
|
||||
SceUID threadID = __KernelSetupRootThread(m->GetUID(), args, argp, options->priority, options->stacksize, options->attribute);
|
||||
__KernelSetThreadRA(threadID, NID_MODULERETURN);
|
||||
|
||||
// TODO: if current thread, put it in wait state, waiting for the new thread
|
||||
// TODO: Really? That sounds fishy.
|
||||
}
|
||||
|
||||
|
||||
@@ -1162,6 +1166,13 @@ u32 sceKernelStopUnloadSelfModuleWithStatus(u32 exitCode, u32 argSize, u32 argp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void __KernelReturnFromModuleFunc()
|
||||
{
|
||||
// Return from the thread as normal.
|
||||
__KernelReturnFromThread();
|
||||
// TODO: sceKernelGetThreadExitStatus, __KernelGetCurThreadModuleId()
|
||||
}
|
||||
|
||||
struct GetModuleIdByAddressArg
|
||||
{
|
||||
u32 addr;
|
||||
|
||||
Reference in New Issue
Block a user