Function report |
Source Code:mm\msync.c |
Create Date:2022-07-28 14:54:00 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:MS_SYNC syncs the entire file - including mappings
Proto:SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
Type:
Parameter:Nothing
37 | unmapped_error = 0 |
42 | If flags & ~( sync memory asynchronously | validate the caches | synchronous memory sync ) Then Go to out |
44 | If offset_in_page(start) Then Go to out |
46 | If flags & sync memory asynchronously && flags & synchronous memory sync Then Go to out |
53 | error = 0 |
62 | cycle |
68 | If Not vma Then Go to out_unlock |
71 | If start < Our start address within vm_mm. Then |
73 | If start >= end Then Go to out_unlock |
75 | unmapped_error = -ENOMEM |
78 | If flags & validate the caches && Flags, see mm.h. & VM_LOCKED Then |
81 | Go to out_unlock |
84 | fstart = start - Our start address within vm_mm. + (Offset (within vm_file) in PAGE_SIZEunits << PAGE_SHIFT determines the page size ) |
86 | fend = fstart + min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(end, The first byte after our end addresswithin vm_mm. ) - start - 1 |
88 | If flags & synchronous memory sync && file && Flags, see mm.h. & VM_SHARED Then |
92 | error = vfs_fsync_range(file, fstart, fend, 1) |
98 | Else |
100 | error = 0 |
101 | Go to out_unlock |
106 | out_unlock : |
108 | out : |
109 | Return If error Else unmapped_error |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |