函数逻辑报告 |
Source Code:mm\vmalloc.c |
Create Date:2022-07-27 16:29:01 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:w_vmap_block - allocates new vmap_block and occupies 2^order pages in this* block
函数原型:static void *new_vmap_block(unsigned int order, gfp_t gfp_mask)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
unsigned int | order | |
gfp_t | gfp_mask |
1503 | 如果此条件成立可能性小(为编译器优化)(!vb)则返回:错误号 |
1509 | 如果是错误则 |
1514 | err等于Load up this CPU's radix_tree_node buffer with sufficient objects to* ensure that the addition of a single element in the tree cannot fail |
1515 | 如果此条件成立可能性小(为编译器优化)(err)则 |
1521 | vaddr等于vmap_block_vaddr(va_start, 0) |
1522 | spin_lock_init( & lock) |
1525 | BUG_ON(VMAP_BBMAP_BITS <= (1UL << order)) |
1526 | free等于VMAP_BBMAP_BITS减1UL左移order位的值 |
1527 | dirty等于0 |
1528 | dirty_min等于VMAP_BBMAP_BITS |
1529 | < dirty range 等于0 |
1530 | 初始化链表头 |
1533 | 加自旋锁 |
1534 | err等于在radix树中插入节点 |
1535 | 自旋锁解锁 |
1537 | radix_tree_preload_end() |
1539 | vbq等于Must be an lvalue. Since @var must be a simple identifier,* we force a syntax error here if it isn't.(Queue of free and dirty vmap blocks, for allocation and flushing purposes ) |
1540 | 加自旋锁 |
1541 | 添加RCU链表项 |
1542 | 自旋锁解锁 |
1543 | The weird & is necessary because sparse considers (void)(var) to be* a direct dereference of percpu variable (var).(Queue of free and dirty vmap blocks, for allocation and flushing purposes ) |
1545 | 返回:vaddr |
名称 | 描述 |
---|---|
vb_alloc |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |