mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
Kernel: Migrate UDP socket table locking to ProtectedValue
This commit is contained in:
parent
9216c72bfe
commit
9517100672
Notes:
sideshowbarker
2024-07-18 07:20:11 +09:00
Author: https://github.com/boricj
Commit: 9517100672
Pull-request: https://github.com/SerenityOS/serenity/pull/8851
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/bgianfo
2 changed files with 37 additions and 36 deletions
|
@ -7,7 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <Kernel/KResult.h>
|
||||
#include <Kernel/Locking/Lockable.h>
|
||||
#include <Kernel/Locking/ProtectedValue.h>
|
||||
#include <Kernel/Net/IPv4Socket.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -23,7 +23,7 @@ public:
|
|||
private:
|
||||
explicit UDPSocket(int protocol, NonnullOwnPtr<DoubleBuffer> receive_buffer);
|
||||
virtual StringView class_name() const override { return "UDPSocket"; }
|
||||
static Lockable<HashMap<u16, UDPSocket*>>& sockets_by_port();
|
||||
static ProtectedValue<HashMap<u16, UDPSocket*>>& sockets_by_port();
|
||||
|
||||
virtual KResultOr<size_t> protocol_receive(ReadonlyBytes raw_ipv4_packet, UserOrKernelBuffer& buffer, size_t buffer_size, int flags) override;
|
||||
virtual KResultOr<size_t> protocol_send(const UserOrKernelBuffer&, size_t) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue