From 98ddea4ddda566a03d04fb6d3ade4f5242005891 Mon Sep 17 00:00:00 2001 From: Weiyi Wang Date: Fri, 9 Nov 2018 00:14:13 -0500 Subject: [PATCH] Kernel: correct MemoryState for TLS --- src/core/hle/kernel/thread.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 5655f6f5f9..7f1749a5fc 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -353,10 +353,9 @@ ResultVal> KernelSystem::CreateThread(std::string name, VAddr auto& vm_manager = owner_process.vm_manager; // Map the page to the current process' address space. - // TODO(Subv): Find the correct MemoryState for this region. vm_manager.MapBackingMemory(Memory::TLS_AREA_VADDR + available_page * Memory::PAGE_SIZE, Memory::fcram.data() + *offset, Memory::PAGE_SIZE, - MemoryState::Private); + MemoryState::Locked); } // Mark the slot as used