函数逻辑报告 |
Source Code:kernel\power\user.c |
Create Date:2022-07-27 11:03:57 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:snapshot_ioctl
函数原型:static long snapshot_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
返回类型:long
参数:
类型 | 参数 | 名称 |
---|---|---|
struct file * | filp | |
unsigned int | cmd | |
unsigned long | arg |
204 | error等于0 |
209 | 如果_IOC_TYPE(cmd)不等于SNAPSHOT_IOC_MAGIC则返回:负ENOTTY |
211 | 如果_IOC_NR(cmd)大于SNAPSHOT_IOC_MAXNR则返回:负ENOTTY |
216 | 如果非mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically则返回:负EBUSY |
219 | lock_device_hotplug() |
224 | 当:cmd恒等于SNAPSHOT_FREEZE |
228 | ksys_sync_helper() |
235 | 如果error则thaw_processes() |
237 | 否则frozen = true |
240 | 退出 |
242 | 当:cmd恒等于SNAPSHOT_UNFREEZE |
252 | 当:cmd恒等于SNAPSHOT_CREATE_IMAGE |
257 | pm_restore_gfp_mask() |
259 | 如果非error则 |
260 | error等于put_user - Write a simple value into user space(in_suspend, (int__user * )arg) |
261 | ready等于非freezer_test_done且非error |
262 | freezer_test_done = false |
264 | 退出 |
266 | 当:cmd恒等于SNAPSHOT_ATOMIC_RESTORE |
276 | 当:cmd恒等于SNAPSHOT_FREE |
278 | memset( & handle, 0, sizeof(structsnapshot_handle)) |
279 | ready = false |
288 | thaw_kernel_threads() |
289 | 退出 |
291 | 当:cmd恒等于SNAPSHOT_PREF_IMAGE_SIZE |
293 | 退出 |
295 | 当:cmd恒等于SNAPSHOT_GET_IMAGE_SIZE |
296 | 如果非ready则 |
300 | size等于snapshot_get_image_size() |
301 | size左移等于PAGE_SHIFT determines the page size 位 |
303 | 退出 |
305 | 当:cmd恒等于SNAPSHOT_AVAIL_SWAP_SIZE |
311 | 当:cmd恒等于SNAPSHOT_ALLOC_SWAP_PAGE |
312 | 如果swap小于0或swap大于等于MAX_SWAPFILES则 |
316 | offset等于alloc_swapdev_block - allocate a swap page and register that it has* been allocated, so that it can be freed in case of an error. |
317 | 如果offset则 |
320 | 否则 |
323 | 退出 |
325 | 当:cmd恒等于SNAPSHOT_FREE_SWAP_PAGES |
326 | 如果swap小于0或swap大于等于MAX_SWAPFILES则 |
331 | 退出 |
333 | 当:cmd恒等于SNAPSHOT_S2RAM |
334 | 如果非frozen则 |
342 | error等于suspend_devices_and_enter - Suspend devices and enter system sleep state.*@state: System sleep state to enter. |
343 | ready = false |
344 | 退出 |
346 | 当:cmd恒等于SNAPSHOT_PLATFORM_SUPPORT |
347 | platform_support等于非非arg |
348 | 退出 |
350 | 当:cmd恒等于SNAPSHOT_POWER_OFF |
351 | 如果platform_support则error等于hibernation_platform_enter - Power off the system using the platform driver. |
353 | 退出 |
355 | 当:cmd恒等于SNAPSHOT_SET_SWAP_AREA |
356 | 如果swsusp_swap_in_use()则 |
358 | 否则 |
362 | error等于copy_from_user( & swap_area, (void__user * )arg, sizeof(structresume_swap_area)) |
364 | 如果error则 |
373 | swdev等于new_decode_dev(dev) |
374 | 如果swdev则 |
379 | 否则 |
384 | 退出 |
386 | 默认 |
391 | unlock_device_hotplug() |
394 | 返回:error |
名称 | 描述 |
---|---|
snapshot_compat_ioctl |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |