Merge pull request #671 from MerryMage/clear-exclusive-state

scheduler: Clear exclusive state when switching contexts
This commit is contained in:
bunnei 2018-07-17 07:33:32 -07:00 committed by GitHub
commit 88a3140c9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 0 deletions

View file

@ -85,6 +85,7 @@ void Scheduler::SwitchContext(Thread* new_thread) {
cpu_core->LoadContext(new_thread->context);
cpu_core->SetTlsAddress(new_thread->GetTLSAddress());
cpu_core->ClearExclusiveState();
} else {
current_thread = nullptr;
// Note: We do not reset the current process and current page table when idling because