97 lines
3.2 KiB
Groff
97 lines
3.2 KiB
Groff
.\" Copyright (c) 1991, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)msync.2 8.2 (Berkeley) 6/21/94
|
|
.\" %FreeBSD: src/lib/libc/sys/msync.2,v 1.25 2002/12/19 09:40:25 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd June 21, 1994
|
|
.Dt MSYNC 2
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm msync
|
|
.Nd ¥Þ¥Ã¥×¤µ¤ì¤¿Îΰè¤òƱ´ü²½¤¹¤ë
|
|
.Sh ¥é¥¤¥Ö¥é¥ê
|
|
.Lb libc
|
|
.Sh ½ñ¼°
|
|
.In sys/mman.h
|
|
.Ft int
|
|
.Fn msync "void *addr" "size_t len" "int flags"
|
|
.Sh ²òÀâ
|
|
.Fn msync
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢½¤Àµ¤µ¤ì¤¿¥Ú¡¼¥¸¤ò¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë½ñ¤¹þ¤ó¤Ç
|
|
¥Õ¥¡¥¤¥ë½¤Àµ»þ¹ï¤ò¹¹¿·¤·¤Þ¤¹¡£
|
|
.Fa len
|
|
¤¬ 0 ¤Î¾ì¹ç¡¢
|
|
.Fa addr
|
|
¤ò´Þ¤à¥ê¡¼¥¸¥ç¥óÆâ¤Î¤¹¤Ù¤Æ¤Î½¤ÀµºÑ¤ß¥Ú¡¼¥¸¤¬¥Õ¥é¥Ã¥·¥å¤µ¤ì¤Þ¤¹¡£
|
|
.Fa len
|
|
¤¬ 0 ¤Ç¤Ê¤¤¾ì¹ç¡¢
|
|
.Fa addr
|
|
¤«¤é
|
|
.Fa len-1
|
|
¤ÎÈϰϤò´Þ¤à¥Ú¡¼¥¸¤À¤±¤¬Ä´¤Ù¤é¤ì¤Þ¤¹¡£
|
|
.Fa flags
|
|
°ú¿ô¤Ï¼¡¤Î¤è¤¦¤Ë»ØÄê¤Ç¤¤Þ¤¹:
|
|
.Bd -literal
|
|
MS_ASYNC ¤¿¤À¤Á¤ËÌá¤ê¤Þ¤¹
|
|
MS_SYNC Ʊ´ü½ñ¹þ¤ß¤ò¼Â¹Ô¤·¤Þ¤¹
|
|
MS_INVALIDATE ¥¥ã¥Ã¥·¥å¤µ¤ì¤¿¥Ç¡¼¥¿¤ò¤¹¤Ù¤Æ̵¸ú¤Ë¤·¤Þ¤¹
|
|
.Ed
|
|
.Sh Ìá¤êÃÍ
|
|
.Rv -std msync
|
|
.Sh ¥¨¥é¡¼
|
|
.Fn msync
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¼¡¤Î¾ì¹ç¤Ë¼ºÇÔ¤·¤Þ¤¹:
|
|
.Bl -tag -width Er
|
|
.It Bq Er EINVAL
|
|
.Fa addr
|
|
°ú¿ô¤Ï¥Ï¡¼¥É¥¦¥§¥¢¥Ú¡¼¥¸¥µ¥¤¥º¤ÎÇÜ¿ô¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
|
|
.It Bq Er EINVAL
|
|
.Fa len
|
|
°ú¿ô¤¬Â礤¹¤®¤ë¤«¡¢¤Þ¤¿¤ÏÉé¤Ç¤¹¡£
|
|
.It Bq Er EINVAL
|
|
.Fa flags
|
|
°ú¿ô¤Ë MS_ASYNC ¤È MS_INVALIDATE ¤ÎξÊý¤¬»ØÄꤵ¤ì¤Þ¤·¤¿¡£
|
|
¤³¤ì¤é¤Î¥Õ¥é¥°¤ÏƱ»þ¤Ë»ØÄꤹ¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£
|
|
.It Bq Er EIO
|
|
¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë½ñ¤¹þ¤à´Ö¤ËÆþ½ÐÎÏ¥¨¥é¡¼¤¬È¯À¸¤·¤Þ¤·¤¿¡£
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr madvise 2 ,
|
|
.Xr mincore 2 ,
|
|
.Xr mprotect 2 ,
|
|
.Xr munmap 2
|
|
.Sh Îò»Ë
|
|
.Fn msync
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï
|
|
.Bx 4.4
|
|
¤Ç¤Ï¤¸¤á¤ÆÅо줷¤Þ¤·¤¿¡£
|