⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hello.mod.c

📁 Linux 2.6内核版本下的PCI字符驱动开发练习参考代码。
💻 C
字号:
#include <linux/module.h>#include <linux/vermagic.h>#include <linux/compiler.h>MODULE_INFO(vermagic, VERMAGIC_STRING);struct module __this_module__attribute__((section(".gnu.linkonce.this_module"))) = { .name = KBUILD_MODNAME, .init = init_module,#ifdef CONFIG_MODULE_UNLOAD .exit = cleanup_module,#endif};static const struct modversion_info ____versions[]__attribute_used____attribute__((section("__versions"))) = {	{ 0x30c5d25f, "struct_module" },	{ 0x43d5b2dd, "register_chrdev" },	{ 0x1b7d4074, "printk" },	{ 0xc192d491, "unregister_chrdev" },};static const char __module_depends[]__attribute_used____attribute__((section(".modinfo"))) ="depends=";MODULE_INFO(srcversion, "7889A4301AB4F7C2A91B8EF");

⌨️ 快捷键说明

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