fixed the under development line
[unix-history] / usr / src / lib / libc / sys / msync.2
CommitLineData
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
17The
18.Fn msync
19system call
e792f309
KM
20writes any modified pages back to the filesystem and updates
21the file modification time.
189a2f10
CL
22If
23.Fa len
24is 0, all modified pages within the region containing
25.Fa addr
e792f309 26will be flushed;
189a2f10
CL
27if
28.Fa len
29is non-zero, only the pages containing
30.Fa addr
31and
32.Fa len
e792f309
KM
33succeeding locations will be examined.
34Any required synchronization of memory caches
35will also take place at this time.
36Filesystem operations on a file that is mapped for shared modifications
189a2f10
CL
37are 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
45The
46.Fn msync
47function call is
48.Ud .
49