diff --git a/kernel/include/kernel/Input/PS2/Mouse.h b/kernel/include/kernel/Input/PS2/Mouse.h index 096b0ffc8d..00ab1a8d6c 100644 --- a/kernel/include/kernel/Input/PS2/Mouse.h +++ b/kernel/include/kernel/Input/PS2/Mouse.h @@ -35,7 +35,7 @@ namespace Kernel::Input uint8_t m_mouse_id { 0x00 }; uint8_t m_button_mask { 0x00 }; - BAN::CircularQueue m_event_queue; + BAN::CircularQueue m_event_queue; Semaphore m_semaphore; diff --git a/kernel/kernel/Input/PS2/Keyboard.cpp b/kernel/kernel/Input/PS2/Keyboard.cpp index b8c29fa3e6..6aa1efedf0 100644 --- a/kernel/kernel/Input/PS2/Keyboard.cpp +++ b/kernel/kernel/Input/PS2/Keyboard.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #define SET_MASK(byte, mask, on_off) ((on_off) ? ((byte) | (mask)) : ((byte) & ~(mask))) #define TOGGLE_MASK(byte, mask) ((byte) ^ (mask)) @@ -158,7 +159,7 @@ namespace Kernel::Input while (true) { if (m_event_queue.empty()) - m_semaphore.block(); + TRY(Thread::current().block_or_eintr(m_semaphore)); CriticalScope _; if (m_event_queue.empty()) diff --git a/kernel/kernel/Input/PS2/Mouse.cpp b/kernel/kernel/Input/PS2/Mouse.cpp index 2de5ab34e3..103d620c17 100644 --- a/kernel/kernel/Input/PS2/Mouse.cpp +++ b/kernel/kernel/Input/PS2/Mouse.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #define SET_MASK(byte, mask, on_off) ((on_off) ? ((byte) | (mask)) : ((byte) & ~(mask))) #define TOGGLE_MASK(byte, mask) ((byte) ^ (mask)) @@ -188,7 +189,7 @@ namespace Kernel::Input while (true) { if (m_event_queue.empty()) - m_semaphore.block(); + TRY(Thread::current().block_or_eintr(m_semaphore)); CriticalScope _; if (m_event_queue.empty())