October 2017
Intermediate to advanced
586 pages
14h 8m
English
A struct kobj_type structure describes the behavior of kobjects. A kobj_type structure describes the type of object that embeds a kobject by means of the ktype field. Every structure that embeds a kobject needs a corresponding kobj_type, which will control what happens when the kobject is created and destroyed, and when attributes are read or written to. Every kobject has a field of the struct kobj_type type, which stands for kernel object type:
struct kobj_type {
void (*release)(struct kobject *);
const struct sysfs_ops sysfs_ops;
struct attribute **default_attrs;
};
A struct kobj_type structure allows kernel objects to share common operations (sysfs_ops), whether those objects are functionally related or not. Fields of that structure ...