函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\aio.c Create Date:2022-07-29 10:53:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__get_reqs_available

函数原型:static bool __get_reqs_available(struct kioctx *ctx)

返回类型:bool

参数:

类型参数名称
struct kioctx *ctx
922  bool ret = false
925  local_irq_save(flags)
926  kcpu等于this_cpu_ptr(cpu)
927  如果非reqs_available
928  avail等于atomic_read( & * This counts the number of available slots in the ringbuffer, * so we avoid overflowing it: it's decremented (if positive) * when allocating a kiocb and incremented when the resulting * io_event is pulled off the ringbuffer. * We batch accesses to it with)
930  循环
934  old等于avail
937 avail不等于old循环
939  reqs_available加等于* For percpu reqs_available, number of slots we move to/from global * counter at a time:
942  ret = true
943  reqs_available自减
944  out :
945  local_irq_restore(flags)
946  返回:ret
调用者
名称描述
get_reqs_available