OSDN Git Service

(split) LDP: Update the version to 3.53 in PO files
[linuxjm/LDP_man-pages.git] / draft / man2 / msync.2
1 .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\"*******************************************************************
26 .\"
27 .\" This file was generated with po4a. Translate the source file.
28 .\"
29 .\"*******************************************************************
30 .TH MSYNC 2 2008\-04\-22 Linux "Linux Programmer's Manual"
31 .SH 名前
32 msync \- ファイルをマップしたメモリと同期させる
33 .SH 書式
34 \fB#include <sys/mman.h>\fP
35 .sp
36 \fBint msync(void *\fP\fIaddr\fP\fB, size_t \fP\fIlength\fP\fB, int \fP\fIflags\fP\fB);\fP
37 .SH 説明
38 \fBmsync\fP()  は \fBmmap\fP(2)  を使ってメモリにマップされたファイルの、 メモリ上のコピーになされた変更をディスクに反映させる。
39 この関数を使用しないと、 \fBmunmap\fP(2)  が呼び出されるまで変更が書き戻される保証はない。 より正確には、ファイルのうち \fIaddr\fP
40 から始まり長さ \fIlength\fP のメモリ領域に対応する部分が更新される。
41
42 \fIflags\fP 引数にはビット \fBMS_ASYNC\fP, \fBMS_SYNC\fP, \fBMS_INVALIDATE\fP を設定することができるが、
43 \fBMS_ASYNC\fP と \fBMS_SYNC\fP を同時に指定することはできない。 \fBMS_ASYNC\fP
44 は更新を予定に組み込むことを表し、呼び出しは直ちに返る。 \fBMS_SYNC\fP は更新を要求し、更新が完了するまで待つ。
45 \fBMS_INVALIDATE\fP は(たった今書き込んだ新しい値でマッピングを更新することができるように)
46 同じファイルに対する他のマッピングを無効にすることを要求する。
47 .SH 返り値
48 成功した場合、 0 が返る。エラーの場合、 \-1 が返り、 \fIerrno\fP が適切に設定される。
49 .SH エラー
50 .TP 
51 \fBEBUSY\fP
52 I flags に \fBMS_INVALIDATE\fP が指定されたが、指定されたアドレス範囲にロックが存在する。
53 .TP 
54 \fBEINVAL\fP
55 \fIaddr\fP が PAGESIZE の倍数でない。または、 \fIflags\fP に
56 \fBMS_ASYNC\fP、\fBMS_INVALIDATE\fP、\fBMS_SYNC\fP 以外のビットが設定された。 または、 \fIflags\fP に
57 \fBMS_SYNC\fP と \fBMS_ASYNC\fP の両方が設定された。
58 .TP 
59 \fBENOMEM\fP
60 指定されたメモリ (またはその一部) がマップされていない。
61 .SH 準拠
62 POSIX.1\-2001.
63
64 この関数は Linux 1.3.21 で導入されたが、 \fBENOMEM\fP ではなく \fBEFAULT\fP が使われていた。 これは Linux
65 2.4.19 で POSIX における値 \fBENOMEM\fP に変更された。
66 .SH 可用性
67 .\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
68 .\" -1: unavailable, 0: ask using sysconf().
69 .\" glibc defines them to 1.
70 \fBmsync\fP()  が使用可能な POSIX システムでは \fB_POSIX_MAPPED_FILES\fP と
71 \fB_POSIX_SYNCHRONIZED_IO\fP の両方が \fI<unistd.h>\fP で 0 より大きい値に定義される。
72 (\fBsysconf\fP(3)  を参照すること。 )
73 .SH 関連項目
74 \fBmmap\fP(2)
75
76 B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128\-129 and 389\-391.
77 .SH この文書について
78 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
79 である。プロジェクトの説明とバグ報告に関する情報は
80 http://www.kernel.org/doc/man\-pages/ に書かれている。