函数逻辑报告 |
Source Code:kernel\power\swap.c |
Create Date:2022-07-27 11:02:45 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:save_image_lzo - Save the suspend image data compressed with LZO.*@handle: Swap map handle to use for saving the image.*@snapshot: Image to read data from.*@nr_to_write: Number of pages to save.
函数原型:static int save_image_lzo(struct swap_map_handle *handle, struct snapshot_handle *snapshot, unsigned int nr_to_write)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct swap_map_handle * | handle | |
struct snapshot_handle * | snapshot | |
unsigned int | nr_to_write |
671 | ret等于0 |
679 | unsigned char * page = NULL |
683 | hib_init_batch( & hb) |
689 | nr_threads等于num_online_cpus()减1 |
692 | page等于__get_free_page(GFP_NOIO | __GFP_HIGH) |
693 | 如果非page则 |
700 | 如果非data则 |
709 | 如果非crc则 |
719 | 以thr小于nr_threads循环 |
720 | init_waitqueue_head( & start compression ) |
721 | init_waitqueue_head( & compression done ) |
726 | 如果是错误则 |
737 | init_waitqueue_head( & start crc update ) |
738 | init_waitqueue_head( & crc update done ) |
740 | crc32等于0 |
742 | 以thr小于nr_threads循环 |
743 | uncompressed data [thr]等于unc |
748 | 如果是错误则 |
759 | reqd_free_pages等于Number of pages required to be kept free while writing the image. Always* half of all available low pages before the writing starts. |
761 | 打印信息("Using %u thread(s) for compression\n", nr_threads) |
762 | 打印信息("Compressing and saving image data (%u pages)...\n", nr_to_write) |
764 | m等于nr_to_write除10 |
767 | nr_pages等于0 |
769 | 循环 |
770 | 以thr小于nr_threads循环 |
771 | 以off小于LZO_UNC_SIZE循环 |
773 | 如果ret小于0则转到:out_finish |
785 | nr_pages自加 |
790 | uncompressed length 等于off |
792 | atomic_set( & ady to start flag , 1) |
793 | wake_up( & start compression ) |
799 | r current threads 等于thr |
800 | atomic_set( & ady to start flag , 1) |
801 | wake_up( & start crc update ) |
803 | 以thr小于run_threads循环 |
806 | atomic_set( & ady to stop flag , 0) |
810 | 如果ret小于0则 |
811 | 打印错误信息("LZO compression failed\n") |
812 | 转到:out_finish |
823 | cmp等于compressed length |
845 | atomic_set( & ady to stop flag , 0) |
848 | out_finish : |
849 | err2等于hib_wait_io( & hb) |
856 | out_clean : |
857 | 如果crc则 |
862 | 如果data则 |
870 | 返回:ret |
名称 | 描述 |
---|---|
swsusp_write | swsusp_write - Write entire image and metadata.*@flags: flags to pass to the "boot" kernel in the image header* It is important _NOT_ to umount filesystems at this point. We want* them synced (in case something goes wrong) but we DO not want to mark |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |