1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
26 .\" all rights reserved.
27 .\" Translated Sun Feb 23 19:45:43 JST 1997
28 .\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
29 .\" Updated and revised Fri Oct 24 23:34:51 JST 2003
30 .\" by Suzuki Takashi.
31 .\" Updated 2007-01-01 by Kentaro Shirakata <argrath@ub32.org>
33 .\"WORD: in-core メモリ上の
35 .TH MSYNC 2 2008-04-22 "Linux" "Linux Programmer's Manual"
37 msync \- ファイルをマップしたメモリと同期させる
39 .B #include <sys/mman.h>
41 .BI "int msync(void *" addr ", size_t " length ", int " flags );
47 メモリ上のコピーになされた変更をディスクに反映させる。
50 が呼び出されるまで変更が書き戻される保証はない。
68 は更新を予定に組み込むことを表し、呼び出しは直ちに返る。
72 は(たった今書き込んだ新しい値でマッピングを更新することができるように)
73 同じファイルに対する他のマッピングを無効にすることを要求する。
75 成功した場合、 0 が返る。エラーの場合、 \-1 が返り、
84 が指定されたが、指定されたアドレス範囲にロックが存在する。
88 が PAGESIZE の倍数でない。または、
91 .BR MS_ASYNC 、 MS_INVALIDATE 、 MS_SYNC
102 指定されたメモリ (またはその一部) がマップされていない。
106 この関数は Linux 1.3.21 で導入されたが、
111 これは Linux 2.4.19 で POSIX における値
117 .B _POSIX_MAPPED_FILES
119 .B _POSIX_SYNCHRONIZED_IO
120 の両方が \fI<unistd.h>\fP で 0 より大きい値に定義される。
123 .\" POSIX.1-2001: これらの値は -1 または 0 または 200112L と定義される。
124 .\" -1 は使用不可能、 0 は sysconf() に問い合わせる
125 .\" glibc では 1 と定義している。
129 B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391.