mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:47:46 +00:00
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.
This commit is contained in:
parent
e475263113
commit
11eee67b85
360 changed files with 1703 additions and 1672 deletions
|
@ -7,22 +7,22 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <Kernel/Forward.h>
|
||||
#include <Kernel/Library/NonnullLockRefPtr.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class Coredump {
|
||||
public:
|
||||
static ErrorOr<NonnullOwnPtr<Coredump>> try_create(NonnullRefPtr<Process>, StringView output_path);
|
||||
static ErrorOr<NonnullOwnPtr<Coredump>> try_create(NonnullLockRefPtr<Process>, StringView output_path);
|
||||
|
||||
~Coredump() = default;
|
||||
ErrorOr<void> write();
|
||||
|
||||
private:
|
||||
Coredump(NonnullRefPtr<Process>, NonnullRefPtr<OpenFileDescription>);
|
||||
static ErrorOr<NonnullRefPtr<OpenFileDescription>> try_create_target_file(Process const&, StringView output_path);
|
||||
Coredump(NonnullLockRefPtr<Process>, NonnullLockRefPtr<OpenFileDescription>);
|
||||
static ErrorOr<NonnullLockRefPtr<OpenFileDescription>> try_create_target_file(Process const&, StringView output_path);
|
||||
|
||||
ErrorOr<void> write_elf_header();
|
||||
ErrorOr<void> write_program_headers(size_t notes_size);
|
||||
|
@ -35,8 +35,8 @@ private:
|
|||
ErrorOr<void> create_notes_regions_data(auto&) const;
|
||||
ErrorOr<void> create_notes_metadata_data(auto&) const;
|
||||
|
||||
NonnullRefPtr<Process> m_process;
|
||||
NonnullRefPtr<OpenFileDescription> m_description;
|
||||
NonnullLockRefPtr<Process> m_process;
|
||||
NonnullLockRefPtr<OpenFileDescription> m_description;
|
||||
size_t m_num_program_headers { 0 };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue