forked from Bananymous/banan-os
Kernel: Implement hacky non-block read for ps2 keyboard
This commit is contained in:
parent
0833d7b43f
commit
951eac6bfa
|
@ -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;
|
||||
|
|
|
@ -234,4 +234,10 @@ namespace Kernel::Input
|
|||
}
|
||||
}
|
||||
|
||||
bool PS2Keyboard::has_data_impl() const
|
||||
{
|
||||
CriticalScope _;
|
||||
return !m_event_queue.empty();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue