Kset和Kobject
来源:互联网 发布:建模 软件 数据 开源 编辑:程序博客网 时间:2024/04/30 11:54
/**
* struct bus_type_private - structure to hold the private to the driver core portions of the bus_type structure.
*
* @subsys - the struct kset that defines this bus. This is the main kobject
* @drivers_kset - the list of drivers associated with this bus
* @devices_kset - the list of devices associated with this bus
* @klist_devices - the klist to iterate over the @devices_kset
* @klist_drivers - the klist to iterate over the @drivers_kset
* @bus_notifier - the bus notifier list for anything that cares about things
* on this bus.
* @bus - pointer back to the struct bus_type that this structure is associated
* with.
*
* This structure is the one that is the actual kobject allowing struct
* bus_type to be statically allocated safely. Nothing outside of the driver
* core should ever touch these fields.
*/
struct bus_type_private {
struct kset subsys; //用来描述总线的kset。
struct kset *drivers_kset; //和bus_type相关的驱动的kset集合
struct kset *devices_kset;//和bus_type相关的设备的kset集合
struct klist klist_devices;
struct klist klist_drivers;
struct blocking_notifier_head bus_notifier;
unsigned int drivers_autoprobe:1;
struct bus_type *bus;
* struct bus_type_private - structure to hold the private to the driver core portions of the bus_type structure.
*
* @subsys - the struct kset that defines this bus. This is the main kobject
* @drivers_kset - the list of drivers associated with this bus
* @devices_kset - the list of devices associated with this bus
* @klist_devices - the klist to iterate over the @devices_kset
* @klist_drivers - the klist to iterate over the @drivers_kset
* @bus_notifier - the bus notifier list for anything that cares about things
* on this bus.
* @bus - pointer back to the struct bus_type that this structure is associated
* with.
*
* This structure is the one that is the actual kobject allowing struct
* bus_type to be statically allocated safely. Nothing outside of the driver
* core should ever touch these fields.
*/
struct bus_type_private {
struct kset subsys; //用来描述总线的kset。
struct kset *drivers_kset; //和bus_type相关的驱动的kset集合
struct kset *devices_kset;//和bus_type相关的设备的kset集合
struct klist klist_devices;
struct klist klist_drivers;
struct blocking_notifier_head bus_notifier;
unsigned int drivers_autoprobe:1;
struct bus_type *bus;
};
/*bus_type结构体用来描述总线。*/
struct bus_type {
const char *name;
struct bus_attribute*bus_attrs;
struct device_attribute*dev_attrs;
struct driver_attribute*drv_attrs;
int (*match)(struct device *dev, struct device_driver *drv);
int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
int (*probe)(struct device *dev);
int (*remove)(struct device *dev);
void (*shutdown)(struct device *dev);
int (*suspend)(struct device *dev, pm_message_t state);
int (*resume)(struct device *dev);
const struct dev_pm_ops *pm;
struct bus_type_private *p;//这个私有指针包含了kset
};
Sysfs文件系统是一个类 似于proc文件系统的特殊文件系统,用于将系统中的设备组织成层次结构,并向用户模式程序提供详细的内核数据结构信息。
1 0
- kobject和kset
- kobject和kset
- kobject和kset
- kobject和kset
- Kobject、Kset 和 Subsystem
- kobject和kset
- kobject和kset .
- kobject和kset
- kobject和kset
- kobject和kset
- Kobject、Kset 和 Subsystem
- kobject和kset
- Kset和Kobject
- Kobject、Kset 和 Subsystem
- Kobject、Kset 和 Subsystem
- kobject和kset
- kobject kset和ktype分析
- kobject&kset
- 分数加减法
- HDU2063 过山车 【二分图·最大匹配】
- 怎样使一个Android应用不被杀死?
- c++中sizeof的用法
- &与&&,|与||区别
- Kset和Kobject
- Android绘图机制(四)自定义控件
- 14.10英语月总
- Leetcode:Remove Duplicates from Sorted Array与Remove Element
- ANDROID内存优化(大汇总——上)
- Ture/False Positive/Negative
- String to Integer (atoi)
- 【Openjudge】最长单词2
- 图像处理与计算机视觉基础,经典以及最近发展