mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-27 20:52:01 +00:00
To do this we also need to get rid of LockRefPtrs in the USB code as well. Most of the SysFS nodes are statically generated during boot and are not mutated afterwards. The same goes for general device code - once we generate the appropriate SysFS nodes, we almost never mutate the node pointers afterwards, making locking unnecessary.
30 lines
816 B
C++
30 lines
816 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/GlobalInformation.h>
|
|
#include <Kernel/KBufferBuilder.h>
|
|
#include <Kernel/UserOrKernelBuffer.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class SysFSInterrupts final : public SysFSGlobalInformation {
|
|
public:
|
|
virtual StringView name() const override { return "interrupts"sv; }
|
|
|
|
static NonnullRefPtr<SysFSInterrupts> must_create(SysFSDirectory const& parent_directory);
|
|
|
|
private:
|
|
explicit SysFSInterrupts(SysFSDirectory const& parent_directory);
|
|
virtual ErrorOr<void> try_generate(KBufferBuilder& builder) override;
|
|
|
|
virtual bool is_readable_by_jailed_processes() const override { return true; }
|
|
};
|
|
|
|
}
|