函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\genalloc.c Create Date:2022-07-27 07:54:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:gen_pool_free_owner - free allocated special memory back to the pool*@pool: pool to free to*@addr: starting address of memory to free back to pool*@size: size in bytes of memory to free*@owner: private data stashed at gen_pool_add() time* Free previously

函数原型:void gen_pool_free_owner(struct gen_pool *pool, unsigned long addr, size_t size, void **owner)

返回类型:void

参数:

类型参数名称
struct gen_pool *pool
unsigned longaddr
size_tsize
void **owner
489  order等于 minimum allocation order
493  BUG_ON(in_nmi())
496  如果owner则 * owner = NULL
499  nbits等于size加1UL左移order位的值减1右移order
500  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
502  如果addr大于等于start address of memory chunk addr小于等于d address of memory chunk (inclusive)
503  BUG_ON(addr + size - 1 > d address of memory chunk (inclusive) )
504  start_bit等于addrstart address of memory chunk 右移order
505  remain等于map_clear_ll - clear the specified number of bits at the specified position*@map: pointer to a bitmap*@start: a bit position in @map*@nr: number of bits to set* Clear @nr bits start from @start in @map lock-lessly. Several users
506  BUG_ON(remain)
507  size等于nbits左移order
508  atomic_long_add(size, & avail)
509  如果ownerowner等于private data to retrieve at alloc time
511  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
512  返回
515  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
516  BUG()
调用者
名称描述
gen_pool_free