2020-02-28 16:20:35 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-02-28 16:20:35 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/Bitmap.h>
|
2021-08-06 05:45:34 -03:00
|
|
|
#include <Kernel/Memory/InodeVMObject.h>
|
2020-02-28 16:20:35 -03:00
|
|
|
#include <Kernel/UnixTypes.h>
|
|
|
|
|
|
2021-08-06 08:49:36 -03:00
|
|
|
namespace Kernel::Memory {
|
2020-02-28 16:20:35 -03:00
|
|
|
|
|
|
|
|
class PrivateInodeVMObject final : public InodeVMObject {
|
|
|
|
|
AK_MAKE_NONMOVABLE(PrivateInodeVMObject);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual ~PrivateInodeVMObject() override;
|
|
|
|
|
|
2021-09-06 07:58:03 -03:00
|
|
|
static KResultOr<NonnullRefPtr<PrivateInodeVMObject>> try_create_with_inode(Inode&);
|
2021-08-15 06:07:59 -03:00
|
|
|
virtual KResultOr<NonnullRefPtr<VMObject>> try_clone() override;
|
2020-02-28 16:20:35 -03:00
|
|
|
|
|
|
|
|
private:
|
2020-03-01 07:08:28 -03:00
|
|
|
virtual bool is_private_inode() const override { return true; }
|
|
|
|
|
|
2020-02-28 16:20:35 -03:00
|
|
|
explicit PrivateInodeVMObject(Inode&, size_t);
|
2021-07-21 19:02:34 -03:00
|
|
|
explicit PrivateInodeVMObject(PrivateInodeVMObject const&);
|
2020-02-28 16:20:35 -03:00
|
|
|
|
2021-07-11 12:57:52 -03:00
|
|
|
virtual StringView class_name() const override { return "PrivateInodeVMObject"sv; }
|
2020-02-28 16:58:57 -03:00
|
|
|
|
2021-07-21 19:02:34 -03:00
|
|
|
PrivateInodeVMObject& operator=(PrivateInodeVMObject const&) = delete;
|
2020-02-28 16:20:35 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|