mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 06:29:00 +01:00
IOS/EmulationKernel: Remove m_device_map_mutex, m_device_map is only modified in the constructor and destructor.
This commit is contained in:
parent
b8f3a47fba
commit
28b82ff8d8
@ -8,7 +8,6 @@
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@ -346,7 +345,6 @@ EmulationKernel::~EmulationKernel()
|
||||
{
|
||||
Core::System::GetInstance().GetCoreTiming().RemoveAllEvents(s_event_enqueue);
|
||||
|
||||
std::lock_guard lock(m_device_map_mutex);
|
||||
m_device_map.clear();
|
||||
m_socket_manager.reset();
|
||||
}
|
||||
@ -558,8 +556,6 @@ void EmulationKernel::AddDevice(std::unique_ptr<Device> device)
|
||||
|
||||
void EmulationKernel::AddStaticDevices()
|
||||
{
|
||||
std::lock_guard lock(m_device_map_mutex);
|
||||
|
||||
const Feature features = GetFeatures(GetVersion());
|
||||
|
||||
// Dolphin-specific device for letting homebrew access and alter emulator state.
|
||||
@ -648,7 +644,6 @@ s32 EmulationKernel::GetFreeDeviceID()
|
||||
|
||||
std::shared_ptr<Device> EmulationKernel::GetDeviceByName(std::string_view device_name)
|
||||
{
|
||||
std::lock_guard lock(m_device_map_mutex);
|
||||
const auto iterator = m_device_map.find(device_name);
|
||||
return iterator != m_device_map.end() ? iterator->second : nullptr;
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
@ -198,7 +197,6 @@ private:
|
||||
|
||||
static constexpr u8 IPC_MAX_FDS = 0x18;
|
||||
std::map<std::string, std::shared_ptr<Device>, std::less<>> m_device_map;
|
||||
std::mutex m_device_map_mutex;
|
||||
// TODO: make this fdmap per process.
|
||||
std::array<std::shared_ptr<Device>, IPC_MAX_FDS> m_fdmap;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user