Sync objects 0.1

This commit is contained in:
wheremyfoodat 2022-11-16 22:02:52 +02:00
parent 182132cbb1
commit 41e01bbdd4
6 changed files with 66 additions and 21 deletions

View file

@ -13,6 +13,7 @@ Kernel::Kernel(CPU& cpu, Memory& mem, GPU& gpu)
threads[i].index = i;
threads[i].tlsBase = VirtualAddrs::TLSBase + i * VirtualAddrs::TLSSize;
threads[i].status = ThreadStatus::Dead;
threads[i].waitList.reserve(10); // Reserve some space for the wait list to avoid further memory allocs later
}
setVersion(1, 69);
@ -101,6 +102,7 @@ void Kernel::reset() {
for (auto& t : threads) {
t.status = ThreadStatus::Dead;
t.waitList.clear();
}
for (auto& object : objects) {