diff options
author | dg <dg@FreeBSD.org> | 1995-03-25 17:24:47 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-03-25 17:24:47 +0000 |
commit | 6136601fad2d6f62f5bd8fd1cb1f1d310d7e3981 (patch) | |
tree | 7e87108fb12f29f9ffb1d5bdeaad42932ccf5e8b /lib/libc | |
parent | d4954bb2528d637f85cea36dc322a454b104bed9 (diff) | |
download | FreeBSD-src-6136601fad2d6f62f5bd8fd1cb1f1d310d7e3981.zip FreeBSD-src-6136601fad2d6f62f5bd8fd1cb1f1d310d7e3981.tar.gz |
Updated manual page to indicate flags argument; added return value and
errors section.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/msync.2 | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/lib/libc/sys/msync.2 b/lib/libc/sys/msync.2 index 2583c15..d976e30 100644 --- a/lib/libc/sys/msync.2 +++ b/lib/libc/sys/msync.2 @@ -38,7 +38,7 @@ .Nm msync .Nd synchronize a mapped region .Sh SYNOPSIS -.Fn msync "caddr_t addr" "int len" +.Fn msync "caddr_t addr" "int len" "int flags" .Sh DESCRIPTION The .Fn msync @@ -57,11 +57,29 @@ is non-zero, only the pages containing and .Fa 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 -.Fn msync . +The +.Fa flags +argument may be specified as follows: +.Bd -literal +MS_ASYNC Return immediately (not currently implemented) +MS_INVALIDATE Invalidate all cached data +.Ed +.Sh RETURN VALUES +If any errors occur, -1 is returned and errno is set to indicate the +error. Otherwise, a 0 value is returned. +.Sh ERRORS +.Fn msync +will fail if: +.Bl -tag -width Er +.It Bq Er EINVAL +.Fa addr +is not a multiple of the hardware page size. +.It Bq Er EINVAL +.Fa len +is too large or negative. +.It Bq Er EINVAL +.Fa flags +was both MS_ASYNC and MS_INVALIDATE. Only one of these flags is allowed. .Sh SEE ALSO .Xr madvise 2 , .Xr munmap 2 , |