Penguin
Annotated edit history of msync(2) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 !!NAME
2 PerryLorier 2 msync - synchronize a file with a memory map
1 perry 3
4 !!SYNOPSIS
2 PerryLorier 5 __#include <unistd.h>__
6 __#include <sys/mman.h>__
1 perry 7
2 PerryLorier 8 __#ifdef _POSIX_MAPPED_FILES__
9 __#ifdef _POSIX_SYNCHRONIZED_IO__
1 perry 10
2 PerryLorier 11 __int msync(const void *__''start''__, size_t__ ''length''__, int__ ''flags''__);__
1 perry 12
2 PerryLorier 13 __#endif__
14 __#endif__
1 perry 15 !!DESCRIPTION
2 PerryLorier 16 __msync__ flushes changes made to the in-core copy of a file that was mapped into memory using mmap(2) back to disk. Without use of this call there is no guarantee that
17 changes are written back before munmap(2) is called. To be more precise, the part of the file that corresponds to the memory area starting at ''start'' and having length
18 ''length'' is updated. The ''flags'' argument may have the bits MS_ASYNC, MS_SYNC and MS_INVALIDATE set, but not both MS_ASYNC and MS_SYNC. MS_ASYNC specifies that an update be scheduled, but the call returns immediately. MS_SYNC asks for an update and waits for it to complete. MS_INVALIDATE asks to invalidate other mappings of the same file (so that they can be updated with the fresh values just written).
1 perry 19
20 !!RETURN VALUE
2 PerryLorier 21 On success, zero is returned. On error, -1 is returned, and ''errno'' is set appropriately.
1 perry 22
23 !!ERRORS
2 PerryLorier 24 ;[EINVAL]: ''start'' is not a multiple of PAGESIZE, or any bit other than MS_ASYNC | MS_INVALIDATE | MS_SYNC is set in ''flags.''
25 ;[EFAULT]: The indicated memory (or part of it) was not mapped.
1 perry 26
27 !!CONFORMING TO
2 PerryLorier 28 POSIX.1b (formerly POSIX.4)
1 perry 29
30 !!SEE ALSO
2 PerryLorier 31 mmap(2), B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391.
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 6 times)