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:
parent
4c9e956225
commit
9a61b334b1
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user