diff options
Diffstat (limited to 'Kernel/Process.h')
-rw-r--r-- | Kernel/Process.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h index abf213aa06..e27adc9d5d 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -35,6 +35,7 @@ #include <AK/String.h> #include <AK/Userspace.h> #include <AK/WeakPtr.h> +#include <AK/Weakable.h> #include <Kernel/API/Syscall.h> #include <Kernel/FileSystem/InodeMetadata.h> #include <Kernel/Forward.h> @@ -106,7 +107,11 @@ struct UnveiledPath { unsigned permissions { 0 }; }; -class Process : public RefCounted<Process>, public InlineLinkedListNode<Process> { +class Process + : public RefCounted<Process> + , public InlineLinkedListNode<Process> + , public Weakable<Process> { + AK_MAKE_NONCOPYABLE(Process); AK_MAKE_NONMOVABLE(Process); @@ -453,7 +458,8 @@ public: [[nodiscard]] String validate_and_copy_string_from_user(Userspace<const char*> user_characters, size_t size) const { - return validate_and_copy_string_from_user(user_characters.unsafe_userspace_ptr(), size); } + return validate_and_copy_string_from_user(user_characters.unsafe_userspace_ptr(), size); + } [[nodiscard]] String validate_and_copy_string_from_user(const Syscall::StringArgument&) const; |