Kernel: Replace CriticalScopes with SpinLocks in networking code

This commit is contained in:
2024-02-29 12:02:09 +02:00
parent 7f028f70d5
commit 90878a7c2b
6 changed files with 35 additions and 30 deletions

View File

@@ -52,6 +52,7 @@ namespace Kernel
private:
SpinLock m_table_lock;
SpinLock m_pending_lock;
BAN::HashMap<BAN::IPv4Address, BAN::MACAddress> m_arp_table;

View File

@@ -71,6 +71,7 @@ namespace Kernel
BAN::UniqPtr<DMARegion> m_tx_buffer_region;
BAN::UniqPtr<DMARegion> m_rx_descriptor_region;
BAN::UniqPtr<DMARegion> m_tx_descriptor_region;
SpinLock m_lock;
BAN::MACAddress m_mac_address {};
bool m_link_up { false };

View File

@@ -76,6 +76,7 @@ namespace Kernel
BAN::UniqPtr<VirtualRange> m_pending_packet_buffer;
BAN::CircularQueue<PendingIPv4Packet, 128> m_pending_packets;
Semaphore m_pending_semaphore;
SpinLock m_pending_lock;
size_t m_pending_total_size { 0 };
BAN::HashMap<int, BAN::WeakPtr<NetworkSocket>> m_bound_sockets;