函数逻辑报告 |
Source Code:kernel\power\swap.c |
Create Date:2022-07-27 11:03:12 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:load_image_lzo - Load compressed image data and decompress them with LZO.*@handle: Swap map handle to use for loading data.*@snapshot: Image to copy uncompressed data into.*@nr_to_read: Number of pages to load.
函数原型:static int load_image_lzo(struct swap_map_handle *handle, struct snapshot_handle *snapshot, unsigned int nr_to_read)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct swap_map_handle * | handle | |
struct snapshot_handle * | snapshot | |
unsigned int | nr_to_read |
1159 | ret等于0 |
1160 | eof等于0 |
1169 | read_pages等于0 |
1170 | unsigned char * * page = NULL |
1174 | hib_init_batch( & hb) |
1180 | nr_threads等于num_online_cpus()减1 |
1184 | 如果非page则 |
1191 | 如果非data则 |
1200 | 如果非crc则 |
1207 | clean_pages_on_decompress = true |
1212 | 以thr小于nr_threads循环 |
1213 | init_waitqueue_head( & start decompression ) |
1214 | init_waitqueue_head( & decompression done ) |
1219 | 如果是错误则 |
1230 | init_waitqueue_head( & start crc update ) |
1231 | init_waitqueue_head( & crc update done ) |
1233 | crc32等于0 |
1234 | points to handle's crc32 等于crc32 |
1235 | 以thr小于nr_threads循环 |
1236 | uncompressed data [thr]等于unc |
1241 | 如果是错误则 |
1255 | 如果Number of free pages that are not high.大于snapshot_get_image_size()则read_pages等于Number of free pages that are not high.减snapshot_get_image_size()的差除2 |
1259 | 以i小于read_pages循环 |
1278 | 打印信息("Using %u thread(s) for decompression\n", nr_threads) |
1279 | 打印信息("Loading and decompressing image data (%u pages)...\n", nr_to_read) |
1281 | m等于nr_to_read除10 |
1284 | nr_pages等于0 |
1288 | 如果ret小于等于0则转到:out_finish |
1291 | 循环 |
1294 | 如果ret则 |
1316 | 如果非have则 |
1329 | 如果r current threads 则 |
1331 | atomic_set( & ady to stop flag , 0) |
1332 | r current threads 等于0 |
1335 | 以have且thr小于nr_threads循环 |
1336 | compressed length 等于page[pg] |
1345 | need等于DIV_ROUND_UP(compressed length + We need to remember how much compressed data we need to read. , PAGE_SIZE) |
1366 | atomic_set( & ady to start flag , 1) |
1367 | wake_up( & start decompression ) |
1383 | 以thr小于run_threads循环 |
1386 | atomic_set( & ady to stop flag , 0) |
1390 | 如果ret小于0则 |
1391 | 打印错误信息("LZO decompression failed\n") |
1392 | 转到:out_finish |
1395 | 如果此条件成立可能性小(为编译器优化)(!uncompressed length || uncompressed length > LZO_UNC_SIZE || uncompressed length & (PAGE_SIZE - 1))则 |
1403 | 以off小于uncompressed length 循环 |
1411 | nr_pages自加 |
1414 | 如果ret小于等于0则 |
1415 | r current threads 等于thr加1 |
1416 | atomic_set( & ady to start flag , 1) |
1417 | wake_up( & start crc update ) |
1418 | 转到:out_finish |
1423 | r current threads 等于thr |
1424 | atomic_set( & ady to start flag , 1) |
1425 | wake_up( & start crc update ) |
1428 | out_finish : |
1429 | 如果r current threads 则 |
1431 | atomic_set( & ady to stop flag , 0) |
1434 | 如果非ret则 |
1435 | 打印信息("Image loading done\n") |
1437 | 如果非snapshot_image_loaded(snapshot)则ret等于负ENODATA |
1439 | 如果非ret则 |
1440 | 如果 Flags to pass to the "boot" kernel 按位与SF_CRC32_MODE则 |
1449 | out_clean : |
1452 | 如果crc则 |
1457 | 如果data则 |
1465 | 返回:ret |
名称 | 描述 |
---|---|
swsusp_read | swsusp_read - read the hibernation image.*@flags_p: flags passed by the "frozen" kernel in the image header should* be written into this memory location |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |