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

Kernel: Rename ProtectedValue<T> => MutexProtected<T>

Let's make it obvious what we're protecting it with.
This commit is contained in:
Andreas Kling 2021-08-21 23:31:15 +02:00
parent 81d990b551
commit c2fc33becd
18 changed files with 57 additions and 56 deletions

View file

@ -7,7 +7,7 @@
#pragma once
#include <Kernel/KResult.h>
#include <Kernel/Locking/ProtectedValue.h>
#include <Kernel/Locking/MutexProtected.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 ProtectedValue<HashMap<u16, UDPSocket*>>& sockets_by_port();
static MutexProtected<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;