NAME
msync —
synchronize a mapped region
SYNOPSIS
msync(caddr_t
addr, int len);
DESCRIPTION
Themsync()
system call writes any modified pages back to the filesystem and updates the
file modification time. If len is 0, all modified pages
within the region containing addr will be flushed; if
len is non-zero, only the pages containing
addr and len succeeding locations
will be examined. Any required synchronization of memory caches will also take
place at this time. Filesystem operations on a file that is mapped for shared
modifications are unpredictable except after an
msync().
ERRORS
The following errors may be reported:
- [
EINVAL] - The addr parameter was not page aligned.
- [
EINVAL] - The addr parameter did not specify an address part of a mapped region.
- [
EINVAL] - The len parameter was negative.
- [
EIO] - An I/O error occured while writing to the file system.
SEE ALSO
HISTORY
The msync() function first appeared in
4.4BSD.