summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-05-02 03:28:20 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-02 03:28:20 +0200
commitc3b7ace3e0d943326575b4d6d7b6a33e47d7242a (patch)
tree3fec7ab24ff125346c7d95851b8ed30806c69b70
parent2dc72bb2974f12667cf8a934ba5fefcc78b6debb (diff)
downloadserenity-c3b7ace3e0d943326575b4d6d7b6a33e47d7242a.zip
Kernel: Assign Lock names in class member initializers.
-rw-r--r--Kernel/Devices/IDEDiskDevice.cpp1
-rw-r--r--Kernel/Devices/IDEDiskDevice.h2
-rw-r--r--Kernel/DoubleBuffer.h3
-rw-r--r--Kernel/FileSystem/FileSystem.cpp6
-rw-r--r--Kernel/FileSystem/FileSystem.h4
-rw-r--r--Kernel/Net/Socket.cpp3
-rw-r--r--Kernel/Net/Socket.h2
-rw-r--r--Kernel/Process.cpp1
-rw-r--r--Kernel/Process.h2
-rw-r--r--Kernel/TTY/PTYMultiplexer.cpp1
-rw-r--r--Kernel/TTY/PTYMultiplexer.h2
-rw-r--r--Kernel/VM/VMObject.h2
12 files changed, 11 insertions, 18 deletions
diff --git a/Kernel/Devices/IDEDiskDevice.cpp b/Kernel/Devices/IDEDiskDevice.cpp
index 1f57aa2d11..87b68c1c96 100644
--- a/Kernel/Devices/IDEDiskDevice.cpp
+++ b/Kernel/Devices/IDEDiskDevice.cpp
@@ -40,7 +40,6 @@ Retained<IDEDiskDevice> IDEDiskDevice::create()
IDEDiskDevice::IDEDiskDevice()
: IRQHandler(IRQ_FIXED_DISK)
- , m_lock("IDEDiskDevice")
{
initialize();
}
diff --git a/Kernel/Devices/IDEDiskDevice.h b/Kernel/Devices/IDEDiskDevice.h
index df0a22fbae..3f48679e0b 100644
--- a/Kernel/Devices/IDEDiskDevice.h
+++ b/Kernel/Devices/IDEDiskDevice.h
@@ -30,7 +30,7 @@ private:
bool read_sectors(dword start_sector, word count, byte* buffer);
bool write_sectors(dword start_sector, word count, const byte* data);
- Lock m_lock;
+ Lock m_lock { "IDEDiskDevice" };
word m_cylinders { 0 };
word m_heads { 0 };
word m_sectors_per_track { 0 };
diff --git a/Kernel/DoubleBuffer.h b/Kernel/DoubleBuffer.h
index 437bc5a372..29b60a07cc 100644
--- a/Kernel/DoubleBuffer.h
+++ b/Kernel/DoubleBuffer.h
@@ -9,7 +9,6 @@ public:
DoubleBuffer()
: m_write_buffer(&m_buffer1)
, m_read_buffer(&m_buffer2)
- , m_lock("DoubleBuffer")
{
}
@@ -31,5 +30,5 @@ private:
Vector<byte> m_buffer2;
ssize_t m_read_buffer_index { 0 };
bool m_empty { true };
- Lock m_lock;
+ Lock m_lock { "DoubleBuffer" };
};
diff --git a/Kernel/FileSystem/FileSystem.cpp b/Kernel/FileSystem/FileSystem.cpp
index c05884a0dc..99a591bcda 100644
--- a/Kernel/FileSystem/FileSystem.cpp
+++ b/Kernel/FileSystem/FileSystem.cpp
@@ -25,8 +25,7 @@ HashTable<Inode*>& all_inodes()
}
FS::FS()
- : m_lock("FS")
- , m_fsid(++s_lastFileSystemID)
+ : m_fsid(++s_lastFileSystemID)
{
all_fses().set(m_fsid, this);
}
@@ -87,8 +86,7 @@ FS::DirectoryEntry::DirectoryEntry(const char* n, int nl, InodeIdentifier i, byt
}
Inode::Inode(FS& fs, unsigned index)
- : m_lock("Inode")
- , m_fs(fs)
+ : m_fs(fs)
, m_index(index)
{
all_inodes().set(this);
diff --git a/Kernel/FileSystem/FileSystem.h b/Kernel/FileSystem/FileSystem.h
index abe31cdd11..575b93b083 100644
--- a/Kernel/FileSystem/FileSystem.h
+++ b/Kernel/FileSystem/FileSystem.h
@@ -62,7 +62,7 @@ public:
protected:
FS();
- mutable Lock m_lock;
+ mutable Lock m_lock { "FS" };
private:
unsigned m_fsid { 0 };
@@ -133,7 +133,7 @@ protected:
void inode_contents_changed(off_t, ssize_t, const byte*);
void inode_size_changed(size_t old_size, size_t new_size);
- mutable Lock m_lock;
+ mutable Lock m_lock { "Inode" };
private:
FS& m_fs;
diff --git a/Kernel/Net/Socket.cpp b/Kernel/Net/Socket.cpp
index 83c7256d00..7fef7bde1d 100644
--- a/Kernel/Net/Socket.cpp
+++ b/Kernel/Net/Socket.cpp
@@ -19,8 +19,7 @@ KResultOr<Retained<Socket>> Socket::create(int domain, int type, int protocol)
}
Socket::Socket(int domain, int type, int protocol)
- : m_lock("Socket")
- , m_domain(domain)
+ : m_domain(domain)
, m_type(type)
, m_protocol(protocol)
{
diff --git a/Kernel/Net/Socket.h b/Kernel/Net/Socket.h
index b0c946ab51..6dcf4e3c3b 100644
--- a/Kernel/Net/Socket.h
+++ b/Kernel/Net/Socket.h
@@ -60,7 +60,7 @@ protected:
void load_send_deadline();
private:
- Lock m_lock;
+ Lock m_lock { "Socket" };
pid_t m_origin_pid { 0 };
int m_domain { 0 };
int m_type { 0 };
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 21b1846929..0db9dd6f88 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -549,7 +549,6 @@ Process::Process(String&& name, uid_t uid, gid_t gid, pid_t ppid, RingLevel ring
, m_executable(move(executable))
, m_tty(tty)
, m_ppid(ppid)
- , m_big_lock("Big Process Lock")
{
dbgprintf("Process: New process PID=%u with name=%s\n", m_pid, m_name.characters());
diff --git a/Kernel/Process.h b/Kernel/Process.h
index 60a788a51b..1461f8992e 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -326,7 +326,7 @@ private:
RetainPtr<ProcessTracer> m_tracer;
- Lock m_big_lock;
+ Lock m_big_lock { "Process" };
};
class ProcessInspectionHandle {
diff --git a/Kernel/TTY/PTYMultiplexer.cpp b/Kernel/TTY/PTYMultiplexer.cpp
index 1ce67f10ed..1620f8f952 100644
--- a/Kernel/TTY/PTYMultiplexer.cpp
+++ b/Kernel/TTY/PTYMultiplexer.cpp
@@ -17,7 +17,6 @@ PTYMultiplexer& PTYMultiplexer::the()
PTYMultiplexer::PTYMultiplexer()
: CharacterDevice(5, 2)
- , m_lock("PTYMultiplexer")
{
s_the = this;
m_freelist.ensure_capacity(s_max_pty_pairs);
diff --git a/Kernel/TTY/PTYMultiplexer.h b/Kernel/TTY/PTYMultiplexer.h
index 59ff194d65..c5979ba991 100644
--- a/Kernel/TTY/PTYMultiplexer.h
+++ b/Kernel/TTY/PTYMultiplexer.h
@@ -27,6 +27,6 @@ private:
// ^CharacterDevice
virtual const char* class_name() const override { return "PTYMultiplexer"; }
- Lock m_lock;
+ Lock m_lock { "PTYMultiplexer" };
Vector<unsigned> m_freelist;
};
diff --git a/Kernel/VM/VMObject.h b/Kernel/VM/VMObject.h
index 658b8f622b..fcffb09f5e 100644
--- a/Kernel/VM/VMObject.h
+++ b/Kernel/VM/VMObject.h
@@ -55,5 +55,5 @@ private:
bool m_allow_cpu_caching { true };
RetainPtr<Inode> m_inode;
Vector<RetainPtr<PhysicalPage>> m_physical_pages;
- Lock m_paging_lock;
+ Lock m_paging_lock { "VMObject" };
};