...
首页> 外文期刊>Linux journal >Device Classes
【24h】

Device Classes

机译:设备类

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

In the last Driving Me Nuts column [see LJ, June 2003], we introduced the kernel driver model framework with an explanation of how the generic bus and driver and device code works. The i2c core was used as an example to show how these different subsystems work. This month, we cover how the driver class code works, again using the i2c code to provide some working examples. As discussed in the last column, device classes do not meet the general object-oriented definition of a class; rather they are something that provides a single type of function to the user. For example, kernel classes are used for tty devices, block devices, network devices, SCSI hosts and, in the near future, filesystems. In the 2.5.69 kernel, the driver class support was rewritten radically. In previous kernel versions, class support was tied tightly to the driver and device support. A class would be bound to the device at the same time it was registered to a driver. This did work for a number of devices and classes, but some real-world devices did not fit very well into this model. Now, class support is tied only loosely to devices and drivers; in fact, a device or driver is not even needed to use the class code now, as the tty class code shows. The class code is now split into three different types of structures: classes, class devices and class interfaces.
机译:在最后的《驾驶我的螺母》列[见LJ,2003年6月]中,我们介绍了内核驱动器模型框架,并解释了通用总线,驱动程序和设备代码的工作方式。 I2C核心被用作展示这些不同子系统如何工作的示例。本月,我们介绍驱动程序类代码的工作原理,再次使用I2C代码提供一些工作示例。如上一列中所述,设备类不符合类的一般面向对象的定义。相反,它们是为用户提供单一类型功能的东西。例如,内核类用于TTY设备,块设备,网络设备,SCSI主机以及在不久的将来的文件系统。在2.5.69内核中,驱动程序类支持是从根本上重写的。在以前的内核版本中,类支持与驱动程序和设备支持紧密相关。一堂课将在设备上注册到驾驶员的同时绑定到设备。这确实适用于许多设备和类,但是一些现实世界的设备与该模型不太合适。现在,班级支持仅与设备和驱动程序息息相关。实际上,如TTY类代码所示,现在甚至不需要现在使用类代码。现在,类代码分为三种不同类型的结构:类,类设备和类接口。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号