diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-06 10:45:34 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-06 14:05:58 +0200 |
commit | a1d7ebf85adca1550b5d61c8b7ab7fe95217e0e2 (patch) | |
tree | dd2e9c08a07ca98694a040ff2c4bd4c86f2741f8 /Kernel/Memory/SharedInodeVMObject.h | |
parent | 4e8e1b7b3a2cd25ab4b69cebea32232496f4a5d3 (diff) | |
download | serenity-a1d7ebf85adca1550b5d61c8b7ab7fe95217e0e2.zip |
Kernel: Rename Kernel/VM/ to Kernel/Memory/
This directory isn't just about virtual memory, it's about all kinds
of memory management.
Diffstat (limited to 'Kernel/Memory/SharedInodeVMObject.h')
-rw-r--r-- | Kernel/Memory/SharedInodeVMObject.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Kernel/Memory/SharedInodeVMObject.h b/Kernel/Memory/SharedInodeVMObject.h new file mode 100644 index 0000000000..05fb8968eb --- /dev/null +++ b/Kernel/Memory/SharedInodeVMObject.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include <AK/Bitmap.h> +#include <Kernel/Memory/InodeVMObject.h> +#include <Kernel/UnixTypes.h> + +namespace Kernel { + +class SharedInodeVMObject final : public InodeVMObject { + AK_MAKE_NONMOVABLE(SharedInodeVMObject); + +public: + static RefPtr<SharedInodeVMObject> try_create_with_inode(Inode&); + virtual RefPtr<VMObject> try_clone() override; + +private: + virtual bool is_shared_inode() const override { return true; } + + explicit SharedInodeVMObject(Inode&, size_t); + explicit SharedInodeVMObject(SharedInodeVMObject const&); + + virtual StringView class_name() const override { return "SharedInodeVMObject"sv; } + + SharedInodeVMObject& operator=(SharedInodeVMObject const&) = delete; +}; + +} |