.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" Translated into german by Martin Schulze (joey@finlandia.infodrom.north.de) .\" .TH MSYNC 2 "15. Juni 1996" "Linux 1.3.86" "Systemaufrufe" .SH BEZEICHNUNG msync \- synchronisiere eine Datei mit dem projizierten Speicherbereich .SH "ÜBERSICHT" .B #include .br .B #include .sp .B #ifdef _POSIX_MAPPED_FILES .br .B #ifdef _POSIX_SYNCHRONIZED_IO .sp .BI "int msync(const void *" start ", size_t " length ", int " flags ); .sp .B #endif .br .B #endif .SH BESCHREIBUNG .B msync schreibt die Änderungen, die in der Kernelkopie der Datei gemacht wurden, die mittels .BR mmap (2) in den Speicher projiziert wurde, auf die Platte. Ohne Verwendung dieses Aufrufs besteht keine Garantie, dass Änderungen auf die Platte geschrieben werden, bevor .BR munmap (2) aufgerufen wird. Um genauer zu sein: Der Teil der Datei, der dem Speicherbereich entspricht, der bei .I start anfängt und .I length lang ist, wird neu geschrieben. Der Parameter .I flags kann die Bits MS_ASYNC, MS_SYNC und MS_INVALIDATE gesetzt haben, jedoch nicht MS_ASYNC und MS_SYNC gleichzeitig. MS_ASYNC bedeutet, dass die Bearbeitung in die Warteschlange aufgenommen werden darf, die Routine kehrt sofort zurück. MS_SYNC bewirkt, dass das Schreiben sofort erledigt wird, die Routine kehrt erst nach dessen Ausführung zurück. MS_INVALIDATE bewirkt, dass andere Projektionen von der gleichen Datei ungültig werden (sodass sie nicht mit den neuen, gerade geschriebenen Werten aktualisiert werden können) .SH "RÜCKGABEWERT" Bei Erfolg wird null zurückgegeben, bei Fehler \-1 und .I errno wird entsprechend gesetzt. .SH FEHLER .TP .BR EINVAL .I start ist kein Vielfaches von PAGESIZE oder ein Bit außer MS_ASYNC | MS_INVALIDATE | MS_SYNC ist in +.IR flags +gesetzt. .TP .B EFAULT Der angegebene Speicherbereich (oder ein Teil davon) ist keine Projektion .SH "KONFORM ZU" POSIX.4. .SH "SIEHE AUCH" .BR mmap (2), B.O. Gallmeister POSIX.4 O'Reilly pp. 128-129 and 389-391.