[Kernel] Fix IPC on non-main threads

This commit is contained in:
wheremyfoodat 2022-09-20 19:23:16 +03:00
parent d3a2591d19
commit 194761ca54

View file

@ -98,9 +98,8 @@ void Kernel::reset() {
}
// Get pointer to thread-local storage
// TODO: Every thread should have its own TLS. We need to adjust for this when we add threads
u32 Kernel::getTLSPointer() {
return VirtualAddrs::TLSBase;
return VirtualAddrs::TLSBase + currentThreadIndex * VirtualAddrs::TLSSize;
}
// Result CloseHandle(Handle handle)