【C语言】函数指针和回调函数
函数指针

函数指针作为参数 → 回调函数

应用——Linux驱动开发
驱动开发步骤

代码
文件名:hello_drv.c
#include <linux\init.h>
#include <linux\module.h>
static int __init hello_drv_init(void){ // 模块装载函数实现
return 0;
}
static void __exit hello_drv_exit(void){ // 模块卸载函数实现
}
module_init(hello_drv_init); // 模块装载声明
module_exit(hello_drv_exist); // 模块卸载声明
MODULE_LICENSE("GPL");
引用
https://www.runoob.com/cprogramming/c-fun-pointer-callback.html
浙公网安备 33010602011771号