mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00

Use the new class in HID code, because all other HID device controllers will be using this class as their parent class. Hence, we no longer keep a reference to any PS/2 device in HIDManagement and rely on HIDController derived classes to do this for us. It also means that we removed another instance of a LockRefPtr, which is designated to be removed and is replaced by the better pattern of SpinlockProtected<RefPtr<>> instead.
28 lines
513 B
C++
28 lines
513 B
C++
/*
|
|
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/AtomicRefCounted.h>
|
|
#include <AK/IntrusiveList.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class HIDManagement;
|
|
class HIDController : public AtomicRefCounted<HIDController> {
|
|
friend class HIDManagement;
|
|
|
|
public:
|
|
virtual ~HIDController() = default;
|
|
|
|
protected:
|
|
HIDController() = default;
|
|
|
|
private:
|
|
IntrusiveListNode<HIDController, NonnullLockRefPtr<HIDController>> m_list_node;
|
|
};
|
|
|
|
}
|