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

Kernel: Rename Socket::lock() => Socket::mutex()

"lock" is ambiguous (verb vs noun) while "mutex" is not.
This commit is contained in:
Andreas Kling 2021-08-29 13:10:55 +02:00
parent 0a7efb7d7b
commit ed0e64943f
6 changed files with 24 additions and 24 deletions

View file

@ -99,7 +99,7 @@ public:
GroupID acceptor_gid() const { return m_acceptor.gid; }
const RefPtr<NetworkAdapter> bound_interface() const { return m_bound_interface; }
Mutex& lock() { return m_lock; }
Mutex& mutex() { return m_mutex; }
// ^File
virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) override final;
@ -149,7 +149,7 @@ protected:
private:
virtual bool is_socket() const final { return true; }
Mutex m_lock { "Socket" };
Mutex m_mutex { "Socket"sv };
int m_domain { 0 };
int m_type { 0 };
@ -180,7 +180,7 @@ public:
: m_socket(move(socket))
{
if (m_socket)
m_socket->lock().lock();
m_socket->mutex().lock();
}
SocketHandle(SocketHandle&& other)
@ -191,7 +191,7 @@ public:
~SocketHandle()
{
if (m_socket)
m_socket->lock().unlock();
m_socket->mutex().unlock();
}
SocketHandle(const SocketHandle&) = delete;