Kernel: Protect global device map with spinlock instead of mutx

This commit is contained in:
Andreas Kling 2022-02-03 01:41:01 +01:00
commit ddde9e7ee5
Notes: sideshowbarker 2024-07-17 19:50:53 +09:00
3 changed files with 5 additions and 6 deletions

View file

@ -77,7 +77,7 @@ private:
RefPtr<DeviceControlDevice> m_device_control_device;
// FIXME: Once we have a singleton for managing many sound cards, remove this from here
NonnullRefPtrVector<CharacterDevice, 1> m_audio_devices;
MutexProtected<HashMap<u64, Device*>> m_devices;
SpinlockProtected<HashMap<u64, Device*>> m_devices;
mutable Spinlock m_event_queue_lock;
CircularQueue<DeviceEvent, 100> m_event_queue;