-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
实现pty,附带测试程序 #685
实现pty,附带测试程序 #685
Conversation
r? @fslongjin dragonosbot has assigned @fslongjin. Use |
设备驱动模型部分发生了更改,请进行审查 cc @fslongjin |
kernel/src/driver/tty/tty_driver.rs
Outdated
pub fn saved_termios(&self) -> &Vec<Termios> { | ||
&self.saved_termios | ||
} | ||
|
||
#[inline] | ||
pub fn flags(&self) -> TtyDriverFlag { | ||
self.flags | ||
} | ||
|
||
#[inline] | ||
fn lockup_tty(&self, index: usize) -> Option<Arc<TtyCore>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哈哈,这里有个错别字,应当是lookup
kernel/src/driver/tty/pty/mod.rs
Outdated
|
||
pub mod unix98pty; | ||
|
||
lazy_static! { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这两个最好使用unified_init来初始化,使得它初始化时机更为确定,减少未来调试的难度。
@@ -536,8 +585,8 @@ pub fn tty_init() -> Result<(), SystemError> { | |||
// 将这两个设备注册到devfs,TODO:这里console设备应该与tty在一个设备group里面 | |||
device_register(tty.clone())?; | |||
device_register(console.clone())?; | |||
devfs_register(tty.name, tty)?; | |||
devfs_register(console.name, console)?; | |||
devfs_register(&tty.name.clone(), tty)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里应该不用clone吧。
issue: #641 |
实现pty功能,能够创建pty对进行通信