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:
@@ -28,7 +28,6 @@ class Device {
|
||||
virtual bool Initialize() = 0;
|
||||
void Dump(StringBuffer* string_buffer);
|
||||
|
||||
xe::recursive_mutex& mutex() { return mutex_; }
|
||||
const std::string& mount_path() const { return mount_path_; }
|
||||
|
||||
virtual bool is_read_only() const { return true; }
|
||||
@@ -41,7 +40,7 @@ class Device {
|
||||
virtual uint32_t bytes_per_sector() const = 0;
|
||||
|
||||
protected:
|
||||
xe::recursive_mutex mutex_;
|
||||
xe::global_critical_region global_critical_region_;
|
||||
std::string mount_path_;
|
||||
std::unique_ptr<Entry> root_entry_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user