Mail Archives: djgpp-workers/1997/11/30/07:53:11
Somebody asked for the docs to tell explicitly that this function was
about disk caches, not DOS buffers. Here's the patch:
*** src/libc/dos/io/flushdc.t~0 Fri Sep 20 02:38:56 1996
--- src/libc/dos/io/flushdc.txh Sat Nov 29 15:54:26 1997
***************
*** 10,17 ****
@subheading Description
Attempts to update the disk with the data cached in the write-behind
! disk cache.
@subheading Return Value
None.
--- 10,31 ----
@subheading Description
Attempts to update the disk with the data cached in the write-behind
! disk caches (such as @code{SmartDrv} and the built-in Windows 95 disk
! cache).
!
! Note that this does @strong{not} flushes the DOS buffers. You need to
! call @code{fsync} (@pxref{fsync}) or @code{close} (@pxref{close}) to
! force DOS to commit the file data to the disk; @code{sync}
! (@pxref{sync}) does that for all open files.
@subheading Return Value
None.
+
+ @subheading Example
+
+ @example
+ /* Make sure all files are actually written to disk. */
+ sync ();
+ _flush_disk_cache ();
+ @end example
- Raw text -