Kernel: Replace CriticalScopes with SpinLock in PS/2 and input code
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <BAN/Array.h>
|
||||
#include <BAN/UniqPtr.h>
|
||||
#include <kernel/Input/KeyEvent.h>
|
||||
#include <kernel/Lock/SpinLock.h>
|
||||
|
||||
namespace Kernel::Input
|
||||
{
|
||||
@@ -23,6 +24,7 @@ namespace Kernel::Input
|
||||
BAN::Array<Key, 0xFF> m_keycode_to_key_normal;
|
||||
BAN::Array<Key, 0xFF> m_keycode_to_key_shift;
|
||||
BAN::Array<Key, 0xFF> m_keycode_to_key_altgr;
|
||||
SpinLock m_lock;
|
||||
|
||||
friend class BAN::UniqPtr<KeyboardLayout>;
|
||||
};
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace Kernel::Input
|
||||
|
||||
BAN::CircularQueue<Command, 128> m_command_queue;
|
||||
uint64_t m_command_send_time { 0 };
|
||||
SpinLock m_command_lock;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace Kernel::Input
|
||||
uint16_t m_modifiers { 0 };
|
||||
|
||||
BAN::CircularQueue<KeyEvent, 50> m_event_queue;
|
||||
SpinLock m_event_lock;
|
||||
|
||||
PS2Keymap m_keymap;
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace Kernel::Input
|
||||
uint8_t m_button_mask { 0x00 };
|
||||
|
||||
BAN::CircularQueue<MouseEvent, 128> m_event_queue;
|
||||
SpinLock m_event_lock;
|
||||
|
||||
Semaphore m_semaphore;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user