/* *File : test.c *Author : DavidLin *Date : 2014-12-07pm *Email : linpeng1577@163.com or linpeng1577@gmail.com *world : the city of SZ, in China *Ver : 000.000.001 *history : editor time do * 1)LinPeng 2014-12-07 created this file! * 2) */ #include <linux/init.h> #include <linux/module.h> static int hello_init(void) { printk("Hello World Insmod\n"); } static void hello_exit(void) { printk("Hello "); } module_init(hello_init); module_exit(hello_exit); MODULE_AUTHOR("Linpeng1577"); MODULE_DESCRLPTION("Kernel: Hello World"); MODULE_LICENSE("GPL"); /* End of test.c */
Linux内核编程:从hello world 开始-(1)_C文件编写
原创linpeng1577 博主文章分类:Linux内核 ©著作权
©著作权归作者所有:来自51CTO博客作者linpeng1577的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
linux下C编程(一)之 hello world
很多人知道在用C语言敲出来hello,world很容易,但是大多数都不知道每一步具体是
spring 预处理 #include -
Qt 编程指南 1 从Hello World开始
1 简单的hello QT 注意项目和路径不要包含任何中文字符,特殊字符,空格。 只能有英文,数字,下划线,且不能数字开头、
字符串 构造函数 #include 控件 封装