Commit | Line | Data |
---|---|---|
189a2f10 | 1 | .\" Copyright (c) 1991, 1991 Regents of the University of California. |
e792f309 KM |
2 | .\" All rights reserved. |
3 | .\" | |
189a2f10 | 4 | .\" %sccs.include.redist.roff% |
e792f309 | 5 | .\" |
3f6f0ccf | 6 | .\" @(#)msync.2 8.1 (Berkeley) %G% |
e792f309 | 7 | .\" |
189a2f10 CL |
8 | .Dd |
9 | .Dt MSYNC 2 | |
10 | .Os | |
11 | .Sh NAME | |
12 | .Nm msync | |
13 | .Nd synchronize a mapped region | |
14 | .Sh SYNOPSIS | |
15 | .Fn msync "caddr_t addr" "int len" | |
16 | .Sh DESCRIPTION | |
17 | The | |
18 | .Fn msync | |
19 | system call | |
e792f309 KM |
20 | writes any modified pages back to the filesystem and updates |
21 | the file modification time. | |
189a2f10 CL |
22 | If |
23 | .Fa len | |
24 | is 0, all modified pages within the region containing | |
25 | .Fa addr | |
e792f309 | 26 | will be flushed; |
189a2f10 CL |
27 | if |
28 | .Fa len | |
29 | is non-zero, only the pages containing | |
30 | .Fa addr | |
31 | and | |
32 | .Fa len | |
e792f309 KM |
33 | succeeding locations will be examined. |
34 | Any required synchronization of memory caches | |
35 | will also take place at this time. | |
36 | Filesystem operations on a file that is mapped for shared modifications | |
189a2f10 CL |
37 | are unpredictable except after an |
38 | .Fn msync . | |
39 | .Sh SEE ALSO | |
40 | .Xr madvise 2 , | |
41 | .Xr munmap 2 , | |
42 | .Xr mprotect 2 , | |
43 | .Xr mincore 2 | |
44 | .Sh HISTORY | |
45 | The | |
46 | .Fn msync | |
47 | function call is | |
48 | .Ud . | |
49 |