函数逻辑报告 |
Source Code:kernel\sysctl.c |
Create Date:2022-07-27 10:11:38 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:proc_do_large_bitmap - read/write from/to a large bitmap*@table: the sysctl table*@write: %TRUE if this is a write to the sysctl file*@buffer: the user buffer*@lenp: the size of the user buffer*@ppos: file position* The bitmap is stored at table->data and
函数原型:int proc_do_large_bitmap(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct ctl_table * | table | |
int | write | |
void __user * | buffer | |
size_t * | lenp | |
loff_t * | ppos |
3169 | err等于0 |
3170 | first等于1 |
3172 | bitmap_len等于maxlen |
3174 | unsigned long * tmp_bitmap = NULL |
3177 | 如果非bitmap或非bitmap_len或非left或ppos且非write则 |
3178 | lenp等于0 |
3179 | 返回:0 |
3182 | 如果write则 |
3184 | skipped等于0 |
3192 | p等于kbuf等于memdup_user_nul(buffer, left) |
3196 | tmp_bitmap等于bitmap_zalloc(bitmap_len, GFP_KERNEL) |
3197 | 如果非tmp_bitmap则 |
3201 | proc_skip_char( & p, & left, '\n') |
3208 | saved_left等于left |
3217 | left等于saved_left |
3218 | 退出 |
3223 | 如果val_a大于等于bitmap_len或neg则 |
3229 | 如果left则 |
3234 | 如果c恒等于'-'则 |
3243 | left等于saved_left |
3244 | 退出 |
3249 | 如果val_b大于等于bitmap_len或neg或val_a大于val_b则 |
3254 | 如果left则 |
3260 | bitmap_set(tmp_bitmap, val_a, val_b - val_a + 1) |
3261 | first等于0 |
3262 | proc_skip_char( & p, & left, '\n') |
3264 | 释放内存 |
3266 | 否则 |
3267 | bit_b等于0 |
3270 | bit_a等于在内存区域中找到下一个设置位 |
3271 | 如果bit_a大于等于bitmap_len则退出 |
3273 | bit_b等于在内存区域中查找下一个零位减1 |
3276 | 如果非first则 |
3285 | err等于proc_put_char( & buffer, & left, '-') |
3293 | first等于0 |
3293 | bit_b自加 |
3295 | 如果非err则err等于proc_put_char( & buffer, & left, '\n') |
3299 | 如果非err则 |
3300 | 如果write则 |
3301 | 如果ppos则bitmap_or(bitmap, bitmap, tmp_bitmap, bitmap_len) |
3303 | 否则bitmap_copy(bitmap, tmp_bitmap, bitmap_len) |
3310 | bitmap_free(tmp_bitmap) |
3311 | 返回:err |
名称 | 描述 |
---|---|
proc_watchdog_cpumask | The cpumask is the mask of possible cpus that the watchdog can run* on, not the mask of cpus it is actually running on. This allows the* user to specify a mask that will include cpus that have not yet* been brought online, if desired. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |