1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 08:06:17 +04:00

Fix serial console

This commit is contained in:
Jiajie Chen 2020-06-16 10:02:56 +08:00
parent 4c9e956225
commit 9a61b334b1

View File

@ -70,7 +70,12 @@ impl Stdin {
loop {
let mut buf_lock = self.buf.lock();
match buf_lock.pop_front() {
Some(c) => return c,
Some(c) => {
if buf_lock.len() == 0 {
self.eventbus.lock().clear(Event::READABLE);
}
return c;
}
None => {
self.pushed.wait(buf_lock);
}