EXPORT_SYMBOL的作用是什么? EXPORT_SYMBOL标签内定义的函数或者符号对全部内核代码公开,不用修改内核代码就可以在您的内核模块中直接调用,即使用EXPORT_SYMBOL可以将一个函数以符号的方式导出给其他模块使用. struct snd_card *snd_cards[SNDRV_CARDS]; EXPORT_SYMBOL(snd_cards); It makes a symbol accessible to dynamically loaded modules (pro…
最近结合<Linux Device Drivers>对kobject的理解,对kobject.c文件添加注释,仅供参考! 1 /** 2 * populate_dir - populate directory with attributes. 3 * @kobj: object we're working on. 4 * 5 * Most subsystems have a set of default attributes that 6 * …
转自:http://blog.csdn.net/zhangxuechao_/article/details/50876397 头文件 include/linux/kthread.h 创建并启动 /** * kthread_run - create and wake a thread. * @threadfn: the function to run until signal_pending(current). * @data: data ptr for @threadfn. * @namefmt…