mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
[Kernel] Much better arbiter & thread scheduling impl
This commit is contained in:
parent
d777981204
commit
81b0f3dde0
8 changed files with 109 additions and 12 deletions
|
@ -7,6 +7,7 @@ Kernel::Kernel(CPU& cpu, Memory& mem, GPU& gpu)
|
|||
: cpu(cpu), regs(cpu.regs()), mem(mem), handleCounter(0), serviceManager(regs, mem, gpu, currentProcess, *this) {
|
||||
objects.reserve(512); // Make room for a few objects to avoid further memory allocs later
|
||||
portHandles.reserve(32);
|
||||
threadIndices.reserve(appResourceLimits.maxThreads);
|
||||
|
||||
for (int i = 0; i < threads.size(); i++) {
|
||||
threads[i].index = i;
|
||||
|
@ -98,6 +99,7 @@ void Kernel::reset() {
|
|||
}
|
||||
objects.clear();
|
||||
portHandles.clear();
|
||||
threadIndices.clear();
|
||||
serviceManager.reset();
|
||||
|
||||
// Allocate handle #0 to a dummy object and make a main process object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue