This commit is contained in:
Ben Vanik 2015-09-06 11:05:16 -07:00
parent e48c3534cc
commit cb3dbcccbc
2 changed files with 2 additions and 1 deletions

View File

@ -87,6 +87,7 @@ class ContentManager {
KernelState* kernel_state_;
std::wstring root_path_;
// TODO(benvanik): remove use of global lock, it's bad here!
xe::global_critical_region global_critical_region_;
std::unordered_map<std::string, ContentPackage*> open_packages_;
};

View File

@ -166,7 +166,7 @@ bool KernelState::IsKernelModule(const char* name) {
// Executing module isn't a kernel module.
return false;
}
auto global_lock = global_critical_region_.Acquire();
// NOTE: no global lock required as the kernel module list is static.
for (auto kernel_module : kernel_modules_) {
if (kernel_module->Matches(name)) {
return true;