文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>我的第一个helloworld程序

我的第一个helloworld程序

时间:2006-07-24  来源:afei_xyd

helloword.c   #include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
 
MODULE_LICENSE("Dual BSD/GPL");
static int hello_init(void)
{
  printk("<1>Hello, world\n");
  return 0;
}
 
static void hello_exit(void)
{
  printk("<1>Goodbye, cruel world\n");
}
 
module_init(hello_init);
module_exit(hello_exit);
Makefile   ifneq ($(KERNELRELEASE),)
     obj-m:=hello.o
else
     KDIR=/lib/modules/$(shell uname -r)/build
     PWD:=$(shell pwd)
default:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
clean:
        $(RM) .*.cmd *.o *.mod.c *.ko -r .tmp*
endif
相关阅读 更多 +
排行榜 更多 +
辣了么卷饼传奇最新版

辣了么卷饼传奇最新版

模拟经营 下载
尸潮塔防最新版

尸潮塔防最新版

策略塔防 下载
火柴人帝国无限安卓版

火柴人帝国无限安卓版

策略塔防 下载