From cb3dbcccbcb0049de9f5cd78812204b583ae987b Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 6 Sep 2015 11:05:16 -0700 Subject: [PATCH] Notes. --- src/xenia/kernel/content_manager.h | 1 + src/xenia/kernel/kernel_state.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xenia/kernel/content_manager.h b/src/xenia/kernel/content_manager.h index 550a1c188..a9342faed 100644 --- a/src/xenia/kernel/content_manager.h +++ b/src/xenia/kernel/content_manager.h @@ -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 open_packages_; }; diff --git a/src/xenia/kernel/kernel_state.cc b/src/xenia/kernel/kernel_state.cc index bc6abe507..befec45dd 100644 --- a/src/xenia/kernel/kernel_state.cc +++ b/src/xenia/kernel/kernel_state.cc @@ -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;