函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vwrite() - write vmalloc area in a safe way.*@buf: buffer for source data*@addr: vm address.*@count: number of bytes to be read.* This function checks that addr is a valid vmalloc'ed area, and* copy data from a buffer to the given addr

函数原型:long vwrite(char *buf, char *addr, unsigned long count)

返回类型:long

参数:

类型参数名称
char *buf
char *addr
unsigned longcount
3000  copied等于0
3003  如果addrcount小于countcount等于负addr
3005  buflen等于count
3007  加自旋锁
3009  如果非count退出
3012  如果非 in "busy" tree 则继续下一循环
3015  vm等于 in "busy" tree
3016  vaddr等于addr
3017  如果addr大于等于vaddrLowlevel-APIs (not for driver use!)则继续下一循环
3019 addr小于vaddr循环
3020  如果count恒等于0则转到:finished
3022  buf自加
3023  addr自加
3024  count自减
3026  n等于vaddrLowlevel-APIs (not for driver use!)addr
3027  如果n大于countn等于count
3029  如果非flags按位与remap() and friends 的值则
3030  aligned_vwrite(buf, addr, n)
3031  copied自加
3033  buf加等于n
3034  addr加等于n
3035  count减等于n
3037  finished :
3038  自旋锁解锁
3039  如果非copied则返回:0
3041  返回:buflen