函数逻辑报告 |
Source Code:lib\test_kmod.c |
Create Date:2022-07-27 07:32:25 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:alloc_test_dev_kmod
函数原型:static struct kmod_test_device *alloc_test_dev_kmod(int idx)
返回类型:struct kmod_test_device
参数:
类型 | 参数 | 名称 |
---|---|---|
int | idx |
1086 | test_dev等于vzalloc(sizeof(structkmod_test_device)) |
1090 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & config_mutex) |
1091 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & trigger_mutex) |
1092 | mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & thread_mutex) |
1094 | init_completion( & kthreads_done) |
1096 | ret等于kmod_config_init(test_dev) |
1097 | 如果ret小于0则 |
1098 | 打印错误信息("Cannot alloc kmod_config_init()\n") |
1099 | 转到:err_out_free |
1105 | minor等于MISC_DYNAMIC_MINOR |
1106 | name等于kasprintf(GFP_KERNEL, "test_kmod%d", idx) |
1107 | 如果非name则 |
1108 | 打印错误信息("Cannot alloc misc_dev->name\n") |
1109 | 转到:err_out_free_config |
1111 | groups等于test_dev_groups |
1113 | 返回:test_dev |
1115 | err_out_free_config : |
1116 | free_test_dev_info(test_dev) |
1117 | kmod_config_free(test_dev) |
1118 | err_out_free : |
1120 | test_dev = NULL |
1121 | err_out : |
1122 | 返回:NULL |
名称 | 描述 |
---|---|
register_test_dev_kmod |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |