神前晓作品:linux export 变量供模块使用
来源:百度文库 编辑:偶看新闻 时间:2024/04/29 00:23:56
Linux symbol export method:
[1] If we want export the symbol in a module, just use the EXPORT_SYMBOL(xxxx) in the C or H file.
And compile the module by adding the compile flag -DEXPORT_SYMTAB.
Then we can use the xxxx in the other module.
[2] If we want export some symbol in Kernel that is not in a module such as xxxx in the /arch/ppc/fec.c.
Firstly, define the xxxx in the fec.c;
Secondly, make a new file which contain the "extern" define the xxxx(for example, extern int xxxx);
Lastly, in the ppc_ksyms.c we includes the new file, and add the EXPORT_SYMBOL(xxxx).
Then we can use the xxxx.
[2].a e.g: 1. 在C文件中定义变量: int export_flag; 2. 在arch/arm/kernel/armksyms.c 文件中 加上: extern int export_flag; export_symbol(export_flag); 就可以了。
[1] If we want export the symbol in a module, just use the EXPORT_SYMBOL(xxxx) in the C or H file.
And compile the module by adding the compile flag -DEXPORT_SYMTAB.
Then we can use the xxxx in the other module.
[2] If we want export some symbol in Kernel that is not in a module such as xxxx in the /arch/ppc/fec.c.
Firstly, define the xxxx in the fec.c;
Secondly, make a new file which contain the "extern" define the xxxx(for example, extern int xxxx);
Lastly, in the ppc_ksyms.c we includes the new file, and add the EXPORT_SYMBOL(xxxx).
Then we can use the xxxx.
[2].a e.g: 1. 在C文件中定义变量: int export_flag; 2. 在arch/arm/kernel/armksyms.c 文件中 加上: extern int export_flag; export_symbol(export_flag); 就可以了。
什么是模块变量?
VFP中变量如何使用
货币政策从制定执行到作后发生效用,可供选择的工具变量,中介变量以及最终变量有哪些?
export quality
无法使用媒体模块?
linux 下面 % 带百分号的变量是什么意思? %abcd
flax3.01的输出选项export to clipyard为什么无法使用
flax3.01的输出选项export to clipyard为什么无法使用
linux 系统使用心得!
linux软件使用问题
想学会使用Linux
使用linux的问题?
如何使用变量做表名?非存储过程
Authorware中如何来使用变量
请问在批处理文件中如何使用变量
countif 中能使用变量吗
请求变量的使用Request.cookie出错
vbscript能使用javascript的变量吗?
关于CAD系统变量的使用问题
通配符能否和变量一起使用
关于vc++使用时有关静态变量的使用问题
打印机使用联供墨水好不好?
怎样做音乐盒,供自己使用?
哪些打印机可以使用连续供墨?