Linux 内核游记 (4)

文章目录TTY设备TTY设备oh, wonderful! Alan1, you are a true wizard
摘要由CSDN通过智能技术生成

TTY子系统

为什么是TTY

因为

There are dark areas of the kernel where only the bravest hackers dare to tread. Places where the code is twisted, the requirements are complex, and everything depends on ancient code which has seen little change over the years because even the most qualified developers fear the consequences. Arguably, no part of the kernel is darker and scarier than the serial terminal (TTY) code.
– Jonathan Corbet1, July, 2009

oh, wonderful! Alan2, you are a true wizard ? The tty layer is one of the very few pieces of kernel code that scares the hell out of me ?
– Ingo Molnar3, July, 2007

青铜时代

tty核心概览
从上图可以看到,内核的tty子系统由tty核心,tty线路规程和tty驱动组成。我们不妨从tty驱动开始说起。

TTY 驱动程序

TTY驱动程序由tty_driver结构所表示。
应使用tty_alloc_driver()来分配该结构。
使用tty_set_operations()设定驱动的操作函数。
然后,使用

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值