Files
ladybird/Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/DumpKmallocStack.h
Liav A 7c0540a229 Everywhere: Move global Kernel pattern code to Kernel/Library directory
This has KString, KBuffer, DoubleBuffer, KBufferBuilder, IOWindow,
UserOrKernelBuffer and ScopedCritical classes being moved to the
Kernel/Library subdirectory.

Also, move the panic and assertions handling code to that directory.
2023-06-04 21:32:34 +02:00

32 lines
814 B
C++

/*
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/RefPtr.h>
#include <AK/Types.h>
#include <Kernel/FileSystem/SysFS/Subsystems/Kernel/Variables/BooleanVariable.h>
#include <Kernel/Library/UserOrKernelBuffer.h>
#include <Kernel/Locking/Spinlock.h>
namespace Kernel {
class SysFSDumpKmallocStacks final : public SysFSSystemBooleanVariable {
public:
virtual StringView name() const override { return "kmalloc_stacks"sv; }
static NonnullRefPtr<SysFSDumpKmallocStacks> must_create(SysFSDirectory const&);
private:
virtual bool value() const override;
virtual void set_value(bool new_value) override;
explicit SysFSDumpKmallocStacks(SysFSDirectory const&);
mutable Spinlock<LockRank::None> m_lock {};
};
}