Function report |
Source Code:lib\test_kmod.c |
Create Date:2022-07-28 06:34:55 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:alloc_test_dev_kmod
Proto:static struct kmod_test_device *alloc_test_dev_kmod(int idx)
Type:struct kmod_test_device
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If ret < 0 Then |
1098 | pr_err("Cannot alloc kmod_config_init()\n") |
1099 | Go to err_out_free |
1105 | minor = MISC_DYNAMIC_MINOR |
1106 | name = kasprintf(GFP_KERNEL, "test_kmod%d", idx) |
1107 | If Not name Then |
1108 | pr_err("Cannot alloc misc_dev->name\n") |
1109 | Go to err_out_free_config |
1111 | groups = test_dev_groups |
1113 | Return 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 | Return NULL |
Name | Describe |
---|---|
register_test_dev_kmod |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |