sys_msync  [mm/msync.c]


Flushes changes made to the in-core copy of a file that was mapped into memory using sys_mmap back to disk.

Without use of this call there is no guarantee that changes are written back before sys_munmap is called.

Arguments

eax 144
ebx Starting address of a memory area to be updated.
ecx Size of the memory area pointed by ebx.
edx Flags. It may have the bits MS_ASYNC, MS_SYNC and MS_INVALIDATE set, but not both MS_ASYNC and MS_SYNC.
MS_ASYNC Specifies that an update be scheduled, but the call returns immediately.
MS_INVALIDATE Asks to invalidate other mappings of the same file (so that they can be updated with the fresh values just written).
MS_SYNC Asks for an update and waits for it to complete.

Return values

If the system call succeeds the return value is 0.
If the system call fails the return value is one of the following errno values:

-EINVAL ebx is not a multiple of PAGESIZE; or any bit other than MS_ASYNC | MS_INVALIDATE | MS_SYNC is set in edx; or both MS_SYNC and MS_ASYNC are set in edx.
-ENOMEM The indicated memory (or part of it) was not mapped.

Remarks

n/a

Compatibility

n/a