Implement sceKernelCheckThreadStack

This commit is contained in:
Henrik Rydgard 2013-03-23 14:26:54 +01:00
parent 60189663db
commit 6a4ae5bb51
3 changed files with 20 additions and 1 deletions

View file

@ -333,6 +333,7 @@ public:
// Fill the stack.
Memory::Memset(stackBlock, 0xFF, stackSize);
context.r[MIPS_REG_SP] = stackBlock + stackSize;
stackEnd = context.r[MIPS_REG_SP];
nt.initialStack = stackBlock;
nt.stackSize = stackSize;
// What's this 512?
@ -429,6 +430,7 @@ public:
std::list<u32> pendingMipsCalls;
u32 stackBlock;
u32 stackEnd;
};
// std::vector<SceUID> with push_front(), remove(), etc.
@ -1832,6 +1834,14 @@ SceUID __KernelGetCurThreadModuleId()
return 0;
}
u32 __KernelGetCurThreadStack()
{
Thread *t = __GetCurrentThread();
if (t)
return t->stackEnd;
return 0;
}
void sceKernelGetThreadId()
{