mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Kernel: Assign Lock names in class member initializers.
This commit is contained in:
parent
2dc72bb297
commit
c3b7ace3e0
12 changed files with 11 additions and 18 deletions
|
@ -40,7 +40,6 @@ Retained<IDEDiskDevice> IDEDiskDevice::create()
|
||||||
|
|
||||||
IDEDiskDevice::IDEDiskDevice()
|
IDEDiskDevice::IDEDiskDevice()
|
||||||
: IRQHandler(IRQ_FIXED_DISK)
|
: IRQHandler(IRQ_FIXED_DISK)
|
||||||
, m_lock("IDEDiskDevice")
|
|
||||||
{
|
{
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ private:
|
||||||
bool read_sectors(dword start_sector, word count, byte* buffer);
|
bool read_sectors(dword start_sector, word count, byte* buffer);
|
||||||
bool write_sectors(dword start_sector, word count, const byte* data);
|
bool write_sectors(dword start_sector, word count, const byte* data);
|
||||||
|
|
||||||
Lock m_lock;
|
Lock m_lock { "IDEDiskDevice" };
|
||||||
word m_cylinders { 0 };
|
word m_cylinders { 0 };
|
||||||
word m_heads { 0 };
|
word m_heads { 0 };
|
||||||
word m_sectors_per_track { 0 };
|
word m_sectors_per_track { 0 };
|
||||||
|
|
|
@ -9,7 +9,6 @@ public:
|
||||||
DoubleBuffer()
|
DoubleBuffer()
|
||||||
: m_write_buffer(&m_buffer1)
|
: m_write_buffer(&m_buffer1)
|
||||||
, m_read_buffer(&m_buffer2)
|
, m_read_buffer(&m_buffer2)
|
||||||
, m_lock("DoubleBuffer")
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,5 +30,5 @@ private:
|
||||||
Vector<byte> m_buffer2;
|
Vector<byte> m_buffer2;
|
||||||
ssize_t m_read_buffer_index { 0 };
|
ssize_t m_read_buffer_index { 0 };
|
||||||
bool m_empty { true };
|
bool m_empty { true };
|
||||||
Lock m_lock;
|
Lock m_lock { "DoubleBuffer" };
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,8 +25,7 @@ HashTable<Inode*>& all_inodes()
|
||||||
}
|
}
|
||||||
|
|
||||||
FS::FS()
|
FS::FS()
|
||||||
: m_lock("FS")
|
: m_fsid(++s_lastFileSystemID)
|
||||||
, m_fsid(++s_lastFileSystemID)
|
|
||||||
{
|
{
|
||||||
all_fses().set(m_fsid, this);
|
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)
|
Inode::Inode(FS& fs, unsigned index)
|
||||||
: m_lock("Inode")
|
: m_fs(fs)
|
||||||
, m_fs(fs)
|
|
||||||
, m_index(index)
|
, m_index(index)
|
||||||
{
|
{
|
||||||
all_inodes().set(this);
|
all_inodes().set(this);
|
||||||
|
|
|
@ -62,7 +62,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
FS();
|
FS();
|
||||||
|
|
||||||
mutable Lock m_lock;
|
mutable Lock m_lock { "FS" };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned m_fsid { 0 };
|
unsigned m_fsid { 0 };
|
||||||
|
@ -133,7 +133,7 @@ protected:
|
||||||
void inode_contents_changed(off_t, ssize_t, const byte*);
|
void inode_contents_changed(off_t, ssize_t, const byte*);
|
||||||
void inode_size_changed(size_t old_size, size_t new_size);
|
void inode_size_changed(size_t old_size, size_t new_size);
|
||||||
|
|
||||||
mutable Lock m_lock;
|
mutable Lock m_lock { "Inode" };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FS& m_fs;
|
FS& m_fs;
|
||||||
|
|
|
@ -19,8 +19,7 @@ KResultOr<Retained<Socket>> Socket::create(int domain, int type, int protocol)
|
||||||
}
|
}
|
||||||
|
|
||||||
Socket::Socket(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_type(type)
|
||||||
, m_protocol(protocol)
|
, m_protocol(protocol)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,7 @@ protected:
|
||||||
void load_send_deadline();
|
void load_send_deadline();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Lock m_lock;
|
Lock m_lock { "Socket" };
|
||||||
pid_t m_origin_pid { 0 };
|
pid_t m_origin_pid { 0 };
|
||||||
int m_domain { 0 };
|
int m_domain { 0 };
|
||||||
int m_type { 0 };
|
int m_type { 0 };
|
||||||
|
|
|
@ -549,7 +549,6 @@ Process::Process(String&& name, uid_t uid, gid_t gid, pid_t ppid, RingLevel ring
|
||||||
, m_executable(move(executable))
|
, m_executable(move(executable))
|
||||||
, m_tty(tty)
|
, m_tty(tty)
|
||||||
, m_ppid(ppid)
|
, m_ppid(ppid)
|
||||||
, m_big_lock("Big Process Lock")
|
|
||||||
{
|
{
|
||||||
dbgprintf("Process: New process PID=%u with name=%s\n", m_pid, m_name.characters());
|
dbgprintf("Process: New process PID=%u with name=%s\n", m_pid, m_name.characters());
|
||||||
|
|
||||||
|
|
|
@ -326,7 +326,7 @@ private:
|
||||||
|
|
||||||
RetainPtr<ProcessTracer> m_tracer;
|
RetainPtr<ProcessTracer> m_tracer;
|
||||||
|
|
||||||
Lock m_big_lock;
|
Lock m_big_lock { "Process" };
|
||||||
};
|
};
|
||||||
|
|
||||||
class ProcessInspectionHandle {
|
class ProcessInspectionHandle {
|
||||||
|
|
|
@ -17,7 +17,6 @@ PTYMultiplexer& PTYMultiplexer::the()
|
||||||
|
|
||||||
PTYMultiplexer::PTYMultiplexer()
|
PTYMultiplexer::PTYMultiplexer()
|
||||||
: CharacterDevice(5, 2)
|
: CharacterDevice(5, 2)
|
||||||
, m_lock("PTYMultiplexer")
|
|
||||||
{
|
{
|
||||||
s_the = this;
|
s_the = this;
|
||||||
m_freelist.ensure_capacity(s_max_pty_pairs);
|
m_freelist.ensure_capacity(s_max_pty_pairs);
|
||||||
|
|
|
@ -27,6 +27,6 @@ private:
|
||||||
// ^CharacterDevice
|
// ^CharacterDevice
|
||||||
virtual const char* class_name() const override { return "PTYMultiplexer"; }
|
virtual const char* class_name() const override { return "PTYMultiplexer"; }
|
||||||
|
|
||||||
Lock m_lock;
|
Lock m_lock { "PTYMultiplexer" };
|
||||||
Vector<unsigned> m_freelist;
|
Vector<unsigned> m_freelist;
|
||||||
};
|
};
|
||||||
|
|
|
@ -55,5 +55,5 @@ private:
|
||||||
bool m_allow_cpu_caching { true };
|
bool m_allow_cpu_caching { true };
|
||||||
RetainPtr<Inode> m_inode;
|
RetainPtr<Inode> m_inode;
|
||||||
Vector<RetainPtr<PhysicalPage>> m_physical_pages;
|
Vector<RetainPtr<PhysicalPage>> m_physical_pages;
|
||||||
Lock m_paging_lock;
|
Lock m_paging_lock { "VMObject" };
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue