Kernel: Implement hacky non-block read for ps2 keyboard

This commit is contained in:
Bananymous 2023-12-19 00:20:46 +02:00
parent 0833d7b43f
commit 951eac6bfa
2 changed files with 7 additions and 0 deletions

View File

@ -64,6 +64,7 @@ namespace Kernel::Input
protected:
virtual BAN::ErrorOr<size_t> read_impl(off_t, BAN::ByteSpan) override;
virtual bool has_data_impl() const override;
private:
const dev_t m_rdev;

View File

@ -234,4 +234,10 @@ namespace Kernel::Input
}
}
bool PS2Keyboard::has_data_impl() const
{
CriticalScope _;
return !m_event_queue.empty();
}
}