最終更新:2015-10-26 (月) 16:23:00 (3098d)  

kobject
Top / kobject

概要

定義

  • linux/kobject.h
    struct kobject {
            const char              *name;
            struct list_head        entry;
            struct kobject          *parent;
            struct kset             *kset;
            struct kobj_type        *ktype;
            struct kernfs_node      *sd;
            struct kref             kref;
    #ifdef CONFIG_DEBUG_KOBJECT_RELEASE
            struct delayed_work     release;
    #endif
            unsigned int state_initialized:1;
            unsigned int state_in_sysfs:1;
            unsigned int state_add_uevent_sent:1;
            unsigned int state_remove_uevent_sent:1;
            unsigned int uevent_suppress:1;
    };
     

ドキュメント

設定する項目

  • char*kset->kobj.name名前
    kobjectkset->kobj.parent親kobject(指定しない場合はkobj->kset->kobj)
    kobj_type?kset->kobj.ktypeclass_ktype?とかdriver_ktype?kset_ktype?
    ksetkset->kobj.kset所属するkset
    kset_uevent_ops?kset.uevent_ops

関数

  • void kobject_init?(struct kobject *);
  • int kobject_add?(struct kobject *);
  • int kobject_register?(struct kobject *);
  • void kobject_del?(struct kobject *);
  • void kobject_unregister?(struct kobject *);
  • struct kobject * kobject_get?(struct kobject *);
  • void kobject_put(struct kobject *);

kset

関連

参考