[*] missing tls impersonation in bd94b73d

This commit is contained in:
Reece Wilson 2023-04-30 09:05:14 +01:00
parent 448d840e4c
commit 7c1a1566fd

View File

@ -602,6 +602,7 @@ namespace Aurora::Threading::Threads
static_cast<OSThread *>(old)->OSDeatach();
}
auto uOldHandle = GetThreadKey();
this->OSAttach();
callback();
@ -615,6 +616,8 @@ namespace Aurora::Threading::Threads
{
HandleRemove();
}
SetThreadKey(uOldHandle);
}
void OSThread::UpdateName()
@ -724,6 +727,10 @@ namespace Aurora::Threading::Threads
this->unixThreadId_ = 0; // !!!!
#endif
if (this->tls_)
{
SetThreadKey(this->tls_);
}
UpdatePrio(this->throttle_, this->prio_);
SetAffinity(this->mask_);
AffinityPrioThrottleTickAmendECores();