mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-10 09:02:14 +02:00
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.
32 lines
814 B
C++
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 {};
|
|
};
|
|
|
|
}
|