/DragonOS/kernel/src/driver/tty/ |
H A D | tty_job_control.rs | 20 pub fn proc_set_tty(tty: Arc<TtyCore>) { in proc_set_tty() 21 let core = tty.core(); in proc_set_tty() 27 assert!(pcb.sig_info_irqsave().tty().is_none()); in proc_set_tty() 31 singal.set_tty(Some(tty.clone())); in proc_set_tty() 35 pub fn tty_check_change(tty: Arc<TtyCore>, sig: Signal) -> Result<(), SystemError> { in tty_check_change() 38 if pcb.sig_info_irqsave().tty().is_none() in tty_check_change() 39 || !Arc::ptr_eq(&pcb.sig_info_irqsave().tty().unwrap(), &tty) in tty_check_change() 44 let core = tty.core(); in tty_check_change() 72 pub fn job_ctrl_ioctl(tty: Arc<TtyCore>, cmd: u32, arg: usize) -> Result<usize, SystemError> { in job_ctrl_ioctl() 75 match Self::tty_check_change(tty.clone(), Signal::SIGTTOU) { in job_ctrl_ioctl() [all …]
|
H A D | tty_port.rs | 23 tty: Weak<TtyCore>, field 42 tty: Weak::new(), in new() 51 pub fn tty(&self) -> Option<Arc<TtyCore>> { in tty() method 52 self.tty.upgrade() in tty() 76 fn setup_internal_tty(&self, tty: Weak<TtyCore>) { in setup_internal_tty() 77 self.port_data().internal_tty = tty; in setup_internal_tty() 82 let tty = self.port_data().internal_tty().unwrap(); in receive_buf() localVariable 84 let ld = tty.ldisc(); in receive_buf() 86 let ret = ld.receive_buf2(tty.clone(), buf, None, count); in receive_buf() 88 return ld.receive_buf(tty, buf, None, count); in receive_buf() [all …]
|
H A D | tty_device.rs | 152 let tty = driver.open_tty(Some(index))?; in open() localVariable 156 tty: tty.clone(), in open() 160 let ret = tty.open(tty.core()); in open() 168 let driver = tty.core().driver(); in open() 176 let pcb_tty = pcb.sig_info_irqsave().tty(); in open() 177 if pcb_tty.is_none() && tty.core().contorl_info_irqsave().session.is_none() { in open() 178 TtyJobCtrlManager::proc_set_tty(tty); in open() 192 let (tty, mode) = if let FilePrivateData::Tty(tty_priv) = &*data { in read_at() 193 (tty_priv.tty(), tty_priv.mode) in read_at() 200 let ld = tty.ldisc(); in read_at() [all …]
|
H A D | tty_core.rs | 14 driver::{base::device::device_number::DeviceNumber, tty::pty::ptm_driver}, 170 pub fn tty_mode_ioctl(tty: Arc<TtyCore>, cmd: u32, arg: usize) -> Result<usize, SystemError> { in tty_mode_ioctl() 171 let core = tty.core(); in tty_mode_ioctl() 177 tty in tty_mode_ioctl() 212 tty: Arc<TtyCore>, in core_set_termios() 218 let mut tmp_termios = *tty.core().termios(); in core_set_termios() 236 let ld = tty.ldisc(); in core_set_termios() 237 let _ = ld.flush_buffer(tty.clone()); in core_set_termios() 244 TtyCore::set_termios_next(tty, tmp_termios)?; in core_set_termios() 248 fn set_termios_next(tty: Arc<TtyCore>, new_termios: Termios) -> Result<(), SystemError> { in set_termios_next() [all …]
|
H A D | tty_driver.rs | 25 tty::tty_port::TtyPortState, 269 let tty = tty_core.core(); in standard_install() localVariable 270 tty.init_termios(); in standard_install() 273 tty.add_count(); in standard_install() 275 self.ttys.lock().insert(tty.index(), tty_core); in standard_install() 280 fn driver_install_tty(&self, tty: Arc<TtyCore>) -> Result<(), SystemError> { in driver_install_tty() 281 let res = tty.install(self.self_ref(), tty.clone()); in driver_install_tty() 285 return self.standard_install(tty); in driver_install_tty() 289 tty.core().name(), in driver_install_tty() 296 self.add_tty(tty); in driver_install_tty() [all …]
|
H A D | kthread.rs | 8 driver::tty::virtual_terminal::vc_manager,
|
/DragonOS/kernel/src/driver/tty/tty_ldisc/ |
H A D | mod.rs | 16 fn open(&self, tty: Arc<TtyCore>) -> Result<(), SystemError>; in open() 17 fn close(&self, tty: Arc<TtyCore>) -> Result<(), SystemError>; in close() 18 fn flush_buffer(&self, tty: Arc<TtyCore>) -> Result<(), SystemError>; in flush_buffer() 30 tty: Arc<TtyCore>, in read() 39 tty: Arc<TtyCore>, in write() 44 fn ioctl(&self, tty: Arc<TtyCore>, cmd: u32, arg: usize) -> Result<usize, SystemError>; in ioctl() 49 fn set_termios(&self, tty: Arc<TtyCore>, old: Option<Termios>) -> Result<(), SystemError>; in set_termios() 51 fn poll(&self, tty: Arc<TtyCore>) -> Result<usize, SystemError>; in poll() 52 fn hangup(&self, tty: Arc<TtyCore>) -> Result<(), SystemError>; in hangup() 57 tty: Arc<TtyCore>, in receive_buf() [all …]
|
H A D | ntty.rs | 11 driver::tty::{ 54 fn ioctl_helper(&self, tty: Arc<TtyCore>, cmd: u32, arg: usize) -> Result<usize, SystemError> { in ioctl_helper() 63 return TtyCore::tty_mode_ioctl(tty.clone(), cmd, arg); in ioctl_helper() 125 tty: Weak<TtyCore>, field 154 tty: Weak::default(), in new() 173 tty: Arc<TtyCore>, in receive_buf_common() 180 let termios = tty.core().termios(); in receive_buf_common() 213 self.receive_buf(tty.clone(), &buf[offset..], Some(&flags[offset..]), n); in receive_buf_common() 215 self.receive_buf(tty.clone(), &buf[offset..], flags, n); in receive_buf_common() 225 if tty.core().flags().contains(TtyFlag::LDISC_CHANGING) { in receive_buf_common() [all …]
|
/DragonOS/kernel/src/driver/tty/pty/ |
H A D | unix98pty.rs | 5 driver::tty::{ 38 fn install(&self, driver: Arc<TtyDriver>, tty: Arc<TtyCore>) -> Result<(), SystemError> { in install() 39 PtyCommon::pty_common_install(driver, tty, false) in install() 42 fn open(&self, tty: &TtyCoreData) -> Result<(), SystemError> { in open() 43 PtyCommon::pty_common_open(tty) in open() 46 fn write(&self, tty: &TtyCoreData, buf: &[u8], nr: usize) -> Result<usize, SystemError> { in write() 47 let to = tty.checked_link()?; in write() 49 if nr == 0 || tty.flow_irqsave().stopped { in write() 56 fn write_room(&self, tty: &TtyCoreData) -> usize { in write_room() 58 if tty.flow_irqsave().stopped { in write_room() [all …]
|
H A D | mod.rs | 97 tty: Arc<TtyCore>, in pty_common_install() 100 let core = tty.core(); in pty_common_install() 119 driver.ttys().insert(core.index(), tty.clone()); in pty_common_install() 126 o_core.set_link(Arc::downgrade(&tty)); in pty_common_install() 129 port1.setup_internal_tty(Arc::downgrade(&tty)); in pty_common_install() 131 tty.set_port(port1); in pty_common_install() 173 pub fn pty_set_lock(tty: &TtyCoreData, arg: VirtAddr) -> Result<(), SystemError> { in pty_set_lock() 178 tty.flags_write().insert(TtyFlag::PTY_LOCK); in pty_set_lock() 180 tty.flags_write().remove(TtyFlag::PTY_LOCK); in pty_set_lock() 186 pub fn pty_get_lock(tty: &TtyCoreData, arg: VirtAddr) -> Result<(), SystemError> { in pty_get_lock() [all …]
|
/DragonOS/kernel/src/driver/video/console/ |
H A D | dummycon.rs | 4 use crate::driver::tty::{ 47 _intensity: crate::driver::tty::virtual_terminal::virtual_console::VirtualConsoleIntensity, in con_build_attr() 67 let tty = vc.port().port_data().tty().unwrap(); in con_init() localVariable 68 tty.resize( in con_init() 69 tty.clone(), in con_init()
|
/DragonOS/kernel/src/driver/serial/serial8250/ |
H A D | serial8250_pio.rs | 21 tty::{ 350 tty: Arc<TtyCore>, in do_install() 353 driver.standard_install(tty.clone())?; in do_install() 354 vc.port().setup_internal_tty(Arc::downgrade(&tty)); in do_install() 355 tty.set_port(vc.port()); in do_install() 367 fn write(&self, tty: &TtyCoreData, buf: &[u8], nr: usize) -> Result<usize, SystemError> { in write() 368 let index = tty.index(); in write() 369 if tty.index() >= unsafe { PIO_PORTS.len() } { in write() 380 fn put_char(&self, tty: &TtyCoreData, ch: u8) -> Result<(), SystemError> { in put_char() 381 self.write(tty, &[ch], 1).map(|_| ()) in put_char() [all …]
|
/DragonOS/kernel/src/driver/tty/virtual_terminal/ |
H A D | mod.rs | 198 .map(|tty| tty.core().name().to_string()) in current_vc_tty_name() 219 .map(|tty| tty.core().name().as_str() == name) in lookup_vc_by_tty_name() 303 fn do_install(&self, tty: Arc<TtyCore>, vc: &Arc<VirtConsole>) -> Result<(), SystemError> { in do_install() 304 let tty_core = tty.core(); in do_install() 344 vc.port().setup_internal_tty(Arc::downgrade(&tty)); in do_install() 345 tty.set_port(vc.port()); in do_install() 354 fn install(&self, _driver: Arc<TtyDriver>, tty: Arc<TtyCore>) -> Result<(), SystemError> { in install() 359 self.do_install(tty, &vc) in install() 375 fn write(&self, tty: &TtyCoreData, buf: &[u8], nr: usize) -> Result<usize, SystemError> { in write() 380 let ret = tty.do_write(buf, nr); in write() [all …]
|
/DragonOS/kernel/src/libs/ |
H A D | printk.rs | 9 driver::tty::{tty_driver::TtyOperation, virtual_terminal::vc_manager}, 44 let tty = port.port_data().internal_tty(); in __write_string() localVariable 45 if let Some(tty) = tty { in __write_string() 46 let _ = tty.write(tty.core(), s.as_bytes(), s.len()); in __write_string()
|
/DragonOS/kernel/src/driver/ |
H A D | mod.rs | 17 pub mod tty; module
|
/DragonOS/kernel/src/process/ |
H A D | stdio.rs | 4 driver::tty::virtual_terminal::vc_manager,
|
H A D | mod.rs | 28 driver::tty::tty_core::TtyCore, 427 if let Some(tty) = pcb.sig_info_irqsave().tty() { in exit() 428 tty.core().contorl_info_irqsave().pgid = None; in exit() 1528 tty: Option<Arc<TtyCore>>, field 1556 pub fn tty(&self) -> Option<Arc<TtyCore>> { in tty() method 1557 self.tty.clone() in tty() 1560 pub fn set_tty(&mut self, tty: Option<Arc<TtyCore>>) { in set_tty() 1561 self.tty = tty; in set_tty() 1586 tty: None, in default()
|
/DragonOS/docs/community/ChangeLog/V0.1.x/ |
H A D | V0.1.9.md | 83 - refactor: 重构tty模块,实现unix兼容tty([#577](https://github.com/DragonOS-Community/DragonOS/pull/577)) 163 fix: 键盘中断上下文不再直接操作tty,而是由专门的kthread来渲染 (#592) 165 fix: 键盘中断上下文不再直接操作tty,而是由专门的kthread来渲染 167 2. 键盘中断上下文不再直接操作tty,而是由专门的kthread来渲染 194 * 修改do_signal和其他中断上下文锁未关中断,以及拓展tty功能,修改tty几个算法bug 268 * 使得put_string系统调用能够通过tty输出颜色 305 将tty输出接入串口 (#555) 344 修改tty几个bug (#549) 350 * 修改一处bug,并且加入tty的link,为pty做准备 361 - 写:printf能够正常在tty输出 [all …]
|
H A D | V0.1.6.md | 43 - stdio: 新增tty设备,用于标准输入输出 (#202) (#217) 197 * 将stdio与tty接上 293 new: tty设备(尚未与stdio接上) (#202)
|
H A D | V0.1.10.md | 45 - fix(driver/tty): 修复tty设备显示在/sys目录下的bug (#668) 74 - feat(tty): add dummy console (#735) 443 Feat(tty): add dummy console (#735) 754 修复tty设备显示在/sys目录下的bug (#668) 789 * fix tty unicode
|
H A D | V0.1.0.md | 183 - 虚拟tty设备
|
/DragonOS/ |
H A D | triagebot.toml | 114 [mentions."kernel/src/driver/tty"] 115 message = "tty驱动发生了更改,请进行审查"
|
/DragonOS/kernel/src/driver/serial/ |
H A D | mod.rs | 10 use super::tty::{
|
/DragonOS/kernel/src/libs/lib_ui/ |
H A D | textui.rs | 3 serial::serial8250::send_to_default_serial8250_port, tty::virtual_terminal::vc_manager, 1046 let tty = port.port_data().internal_tty(); in rs_textui_putchar() localVariable 1047 if let Some(tty) = tty { in rs_textui_putchar() 1048 return tty in rs_textui_putchar()
|
/DragonOS/kernel/src/driver/video/fbdev/base/fbcon/ |
H A D | framebuffer_console.rs | 7 tty::{ 347 op: crate::driver::tty::virtual_terminal::virtual_console::CursorOperation, in con_cursor() 404 dir: crate::driver::tty::virtual_terminal::virtual_console::ScrollDir, in con_scroll()
|