hello3.c

来自「这是motorola公司的powerpc芯片上的嵌入式linux上的驱动程序和测」· C语言 代码 · 共 26 行

C
26
字号
/* the program runing under kernel mod and it is a module*/ #define MODULE#include <linux/kernel.h>  #include <linux/module.h> /* pross the CONFIG_MODVERSIONS*/ #if CONFIG_MODVERSIONS==1 #define MODVERSIONS #include <linux/modversions.h> #endif /*MODULE_LICENSE("GPL");*//* the init function*/ int init_module() {     printk(" <0>hello,  world !\n");     return 0; } /* the distory function*/ void  cleanup_module() {     printk(KERN_ALERT " I  shut down myself from kernerl mod /n"); }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?