mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 14:27:35 +00:00

SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
38 lines
922 B
C++
38 lines
922 B
C++
/*
|
|
* Copyright (c) 2021, the SerenityOS developers
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Kernel/Lock.h>
|
|
#include <Kernel/Storage/StorageDevice.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class RamdiskController;
|
|
|
|
class RamdiskDevice final : public StorageDevice {
|
|
friend class RamdiskController;
|
|
AK_MAKE_ETERNAL
|
|
public:
|
|
static NonnullRefPtr<RamdiskDevice> create(const RamdiskController&, NonnullOwnPtr<Region>&& region, int major, int minor);
|
|
RamdiskDevice(const RamdiskController&, NonnullOwnPtr<Region>&&, int major, int minor);
|
|
virtual ~RamdiskDevice() override;
|
|
|
|
// ^BlockDevice
|
|
virtual void start_request(AsyncBlockDeviceRequest&) override;
|
|
|
|
// ^DiskDevice
|
|
virtual const char* class_name() const override;
|
|
virtual String device_name() const override;
|
|
|
|
bool is_slave() const;
|
|
|
|
Lock m_lock { "RamdiskDevice" };
|
|
|
|
NonnullOwnPtr<Region> m_region;
|
|
};
|
|
|
|
}
|