DANGER DANGER. Switching to global critical region.
This changes almost all locks held by guest threads to use a single global critical region. This emulates the behavior on the PPC of disabling interrupts (by calls like KeRaiseIrqlToDpcLevel or masking interrupts), and prevents deadlocks from occuring when threads are suspended or otherwise blocked. This has performance implications and a pass is needed to ensure the locking is as granular as possible. It could also break everything because it's fundamentally unsound. We'll see.
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#define XENIA_KERNEL_CONTENT_MANAGER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
@@ -88,7 +87,7 @@ class ContentManager {
|
||||
KernelState* kernel_state_;
|
||||
std::wstring root_path_;
|
||||
|
||||
xe::recursive_mutex content_mutex_;
|
||||
xe::global_critical_region global_critical_region_;
|
||||
std::unordered_map<std::string, ContentPackage*> open_packages_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user