delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/11/30/07:53:11

Date: Sun, 30 Nov 1997 14:51:45 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: DJ Delorie <dj AT delorie DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: _flush_disk_cache docs
Message-ID: <Pine.SUN.3.91.971130145003.5999F-100000@is>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019