mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-08 18:26:48 +00:00
fix: tty刷新线程初始化之前,键盘产生数据导致崩溃的问题 (#1013)
Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
parent
37c2359ac4
commit
dc60d68f0e
@ -62,6 +62,10 @@ fn tty_refresh_thread() -> i32 {
|
|||||||
|
|
||||||
/// 发送数据到tty刷新线程
|
/// 发送数据到tty刷新线程
|
||||||
pub fn send_to_tty_refresh_thread(data: &[u8]) {
|
pub fn send_to_tty_refresh_thread(data: &[u8]) {
|
||||||
|
if unsafe { TTY_REFRESH_THREAD.is_none() } {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for item in data {
|
for item in data {
|
||||||
KEYBUF.push(*item).ok();
|
KEYBUF.push(*item).ok();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user