mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-22 11:13:22 +00:00
完成与Linux兼容的Ntty (#517)
* 已经完成的功能: - 写:printf能够正常在tty输出 - 读:与键盘驱动接上 - 信号: 能够正常通过ctrl向前台进程发送信号 * 支持目前的shell,改动printk使其与新版tty兼容。 * 删除原有tty文件夹,并更改新tty文件名 * 添加clear清屏程序 * 实现tty部分ioctl,更改部分问题
This commit is contained in:
@ -3,10 +3,7 @@ use core::{ffi::c_void, sync::atomic::AtomicI32};
|
||||
use alloc::sync::{Arc, Weak};
|
||||
|
||||
use crate::{
|
||||
driver::{
|
||||
base::device::device_number::{DeviceNumber, Major},
|
||||
tty::tty_device::TTY_DEVICES,
|
||||
},
|
||||
driver::base::device::device_number::{DeviceNumber, Major},
|
||||
filesystem::{
|
||||
devfs::{devfs_register, DevFS, DeviceINode},
|
||||
vfs::{
|
||||
@ -23,14 +20,7 @@ use system_error::SystemError;
|
||||
pub struct LockedPS2KeyBoardInode(RwLock<PS2KeyBoardInode>, AtomicI32); // self.1 用来记录有多少个文件打开了这个inode
|
||||
|
||||
lazy_static! {
|
||||
static ref PS2_KEYBOARD_FSM: SpinLock<TypeOneFSM> = {
|
||||
let tty0 = TTY_DEVICES
|
||||
.read()
|
||||
.get("tty0")
|
||||
.expect("Initializing PS2_KEYBOARD_FSM: Cannot found TTY0!")
|
||||
.clone();
|
||||
SpinLock::new(TypeOneFSM::new(tty0))
|
||||
};
|
||||
static ref PS2_KEYBOARD_FSM: SpinLock<TypeOneFSM> = SpinLock::new(TypeOneFSM::new());
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
Reference in New Issue
Block a user