mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-04 02:08:53 +00:00
Kernel: Protect network adapter list with spinlock instead of mutex
This commit is contained in:
parent
0899153170
commit
3becff9eae
Notes:
sideshowbarker
2024-07-18 03:20:18 +09:00
Author: https://github.com/awesomekling
Commit: 3becff9eae
2 changed files with 23 additions and 23 deletions
|
@ -12,7 +12,7 @@
|
|||
#include <AK/NonnullRefPtrVector.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Bus/PCI/Definitions.h>
|
||||
#include <Kernel/Locking/Mutex.h>
|
||||
#include <Kernel/Locking/SpinlockProtected.h>
|
||||
#include <Kernel/Memory/Region.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -40,9 +40,8 @@ public:
|
|||
private:
|
||||
RefPtr<NetworkAdapter> determine_network_device(PCI::DeviceIdentifier const&) const;
|
||||
|
||||
NonnullRefPtrVector<NetworkAdapter> m_adapters;
|
||||
SpinlockProtected<NonnullRefPtrVector<NetworkAdapter>> m_adapters;
|
||||
RefPtr<NetworkAdapter> m_loopback_adapter;
|
||||
mutable Mutex m_lock { "Networking" };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue