IPB
>  Man Pages > Linux > Suse Linux 10.1 > Section 2 > msync man page

msync man page

Section 2 - Suse Linux 10.1 Man Pages

Other operating system man pages available here


Advanced Search

Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!


MSYNC(2)                   Linux Programmer's Manual                  MSYNC(2)




NAME

       msync - synchronize a file with a memory map


SYNOPSIS

       #include <sys/mman.h>

       int msync(void *start, size_t length, int flags);


DESCRIPTION

       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 changes are written back before mun
       map(2) is called.  To be more precise, the part of the file that corre-
       sponds to the memory area starting at start and having length 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 speci-
       fies 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).


RETURN VALUE

       On  success,  zero is returned.  On error, -1 is returned, and errno is
       set appropriately.


ERRORS

       EINVAL start is not a multiple of  PAGESIZE,  or  any  bit  other  than
              MS_ASYNC | MS_INVALIDATE | MS_SYNC is set in flags.

       ENOMEM The indicated memory (or part of it) was not mapped.


AVAILABILITY

       On    POSIX    systems    on   which   msync()   is   available,   both
       _POSIX_MAPPED_FILES   and   _POSIX_SYNCHRONIZED_IO   are   defined   in
       <unistd.h> to a value greater than 0. (See also sysconf(3).)


CONFORMING TO

       POSIX.1b (formerly POSIX.4)

       This  call was introduced in Linux 1.3.21, and then used EFAULT instead
       of ENOMEM. In Linux 2.4.19 this was changed to the POSIX value  ENOMEM.


SEE ALSO

       mmap(2)
       B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128-129 and 389-391.



Linux 2.4                         2003-08-21                          MSYNC(2)


Man(1) output converted with man2html and wrapped by fishsponge

This page was generated on Tue Feb 13 02:17:40 GMT 2007

Your favourite pages:

No pages logged yet.
Trying to save cookie...

Top 10 most popular pages:

sqlite3 man page (5323 hits)
(openSUSE 10.2)

svn man page (5161 hits)
(FreeBSD 6.2)

adv_cap_autoneg man page (4865 hits)
(Solaris 10 11_06)

CPAN man page (4602 hits)
(Suse Linux 10.1)

ssh man page (4337 hits)
(Suse Linux 10.1)

ssh-socks5-proxy-connect man page (2838 hits)
(Solaris 10 11_06)

netcat man page (2687 hits)
(Suse Linux 10.1)

pprosetup man page (2472 hits)
(Solaris 10 11_06)

startproc man page (2450 hits)
(Suse Linux 10.1)

signal man page (2393 hits)
(Suse Linux 10.1)

Useful Links

Go Back

Visitor Statistics


Valid XHTML 1.0 Transitional     Valid CSS!

Partners: Cambridge Plus :: Pyrenees Ski Holidays :: PIC Boot-loader Utility :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum