From 11eee67b8510767d76fb4793e3b62ac1793dd723 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 19 Aug 2022 20:53:40 +0200 Subject: Kernel: Make self-contained locking smart pointers their own classes Until now, our kernel has reimplemented a number of AK classes to provide automatic internal locking: - RefPtr - NonnullRefPtr - WeakPtr - Weakable This patch renames the Kernel classes so that they can coexist with the original AK classes: - RefPtr => LockRefPtr - NonnullRefPtr => NonnullLockRefPtr - WeakPtr => LockWeakPtr - Weakable => LockWeakable The goal here is to eventually get rid of the Lock* classes in favor of using external locking. --- Kernel/Coredump.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Kernel/Coredump.cpp') diff --git a/Kernel/Coredump.cpp b/Kernel/Coredump.cpp index f245578473..0cee94ba20 100644 --- a/Kernel/Coredump.cpp +++ b/Kernel/Coredump.cpp @@ -30,7 +30,7 @@ namespace Kernel { return region.name().starts_with("LibJS:"sv) || region.name().starts_with("malloc:"sv); } -ErrorOr> Coredump::try_create(NonnullRefPtr process, StringView output_path) +ErrorOr> Coredump::try_create(NonnullLockRefPtr process, StringView output_path) { if (!process->is_dumpable()) { dbgln("Refusing to generate coredump for non-dumpable process {}", process->pid().value()); @@ -41,7 +41,7 @@ ErrorOr> Coredump::try_create(NonnullRefPtr pro return adopt_nonnull_own_or_enomem(new (nothrow) Coredump(move(process), move(description))); } -Coredump::Coredump(NonnullRefPtr process, NonnullRefPtr description) +Coredump::Coredump(NonnullLockRefPtr process, NonnullLockRefPtr description) : m_process(move(process)) , m_description(move(description)) { @@ -59,7 +59,7 @@ Coredump::Coredump(NonnullRefPtr process, NonnullRefPtr> Coredump::try_create_target_file(Process const& process, StringView output_path) +ErrorOr> Coredump::try_create_target_file(Process const& process, StringView output_path) { auto output_directory = KLexicalPath::dirname(output_path); auto dump_directory = TRY(VirtualFileSystem::the().open_directory(output_directory, VirtualFileSystem::the().root_custody())); -- cgit v1.2.3