函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:get_swap_reader

函数原型:static int get_swap_reader(struct swap_map_handle *handle, unsigned int *flags_p)

返回类型:int

参数:

类型参数名称
struct swap_map_handle *handle
unsigned int *flags_p
968  flags_p等于 Flags to pass to the "boot" kernel
970  如果非image则返回:负EINVAL
973  cur = NULL
974  last = maps = NULL
975  offset等于image
976 offset循环
977  tmp等于分配内存并置零
978  如果非tmp
980  返回:负ENOMEM
982  如果非mapsmaps等于tmp
984  如果lastnext等于tmp
986  last等于tmp
988  map等于__get_free_page(GFP_NOIO | __GFP_HIGH)
990  如果非map
992  返回:负ENOMEM
995  error等于hib_submit_io(REQ_OP_READ, 0, offset, map, NULL)
996  如果error
998  返回:error
1000  offset等于next_swap
1002  k等于0
1003  cur等于map
1004  返回:0
调用者
名称描述
swsusp_readswsusp_read - read the hibernation image.*@flags_p: flags passed by the "frozen" kernel in the image header should* be written into this memory location