1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

Kernel/TCP: Port TCP retransmit queue to ProtectedValue

I had to switch to exclusive locking since ProtectedValue rightly
doesn't allow you to mutate protected data with only a shared lock.
This commit is contained in:
Andreas Kling 2021-08-07 15:42:11 +02:00
parent 4c582b57e9
commit 0cb6c3c831
2 changed files with 71 additions and 65 deletions

View file

@ -203,9 +203,12 @@ private:
int tx_counter { 0 };
};
mutable Mutex m_not_acked_lock { "TCPSocket unacked packets" };
SinglyLinkedList<OutgoingPacket> m_not_acked;
size_t m_not_acked_size { 0 };
struct UnackedPackets {
SinglyLinkedList<OutgoingPacket> packets;
size_t size { 0 };
};
ProtectedValue<UnackedPackets> m_unacked_packets;
u32 m_duplicate_acks { 0 };