home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 19909 < prev    next >
Encoding:
Internet Message Format  |  1992-12-26  |  1.9 KB

  1. Path: sparky!uunet!usc!cs.utexas.edu!rutgers!spcvxb!terry
  2. From: terry@spcvxb.spc.edu (Terry Kennedy, Operations Mgr.)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: VAX c
  5. Message-ID: <1992Dec26.211521.4768@spcvxb.spc.edu>
  6. Date: 27 Dec 92 02:15:21 GMT
  7. References: <24DEC199220084219@spades.aces.com> <Bzt6EF.Est@dale.cts.com>
  8. Organization: St. Peter's College, US
  9. Lines: 36
  10.  
  11. In article <Bzt6EF.Est@dale.cts.com>, glippert@dale.cts.com (George Lippert) writes:
  12. > So how do I make sure that the buffer gets onto disk? (in my case), I asked.
  13. > They told me that there is an "unsupported and undocumented" function that I
  14. > could call.  Thanks, but no thanks, I said.
  15.  
  16.   At the risk of adding some useful information to this discussion 8-), I
  17. think they were talking about the VAX C fsync() function. This is a worker
  18. function used in the VAXCRTL to flush RMS buffers. It does exactly what you
  19. want. Since it is used by the RTL, it is unlikely to change in future re-
  20. leases of VAX C. On the other hand, it may not be present in DEC C (the up-
  21. coming ANSI-compliant C compiler for VMS from DEC). DEC C may not even need
  22. this as fflush() may work as you hope there. Ehud, want to check this on
  23. your Alpha?
  24.  
  25.   Anyway, here is a brief extract, quoted for purposes of review, of the
  26. fsync() description. This can be found on the listings CD as [V552.VACXRTL
  27. .LIS]VAXCIO.LIS:
  28.  
  29. 2694 ;++ [095]
  30. 2695 ; fsync - force a synchronization of file with user I/O
  31. 2696 ;
  32. 2697 ;    This function simply calls SYS$FLUSH for the file indicated to
  33. 2698 ;    make sure that the physical I/O happens NOW for any logical I/O
  34. 2699 ;    calls that the user has made.
  35. 2700 ;
  36. 2701 ; input:
  37. 2702 ;    4(ap)    file descriptor number
  38. 2703 ;
  39. 2704 ; output:
  40. 2705 ;    R0 =  0    success
  41. 2706 ;    R0 <> 0    error condition - errno updated
  42. 2707 ;
  43.  
  44.     Terry Kennedy        Operations Manager, Academic Computing
  45.     terry@spcvxa.bitnet    St. Peter's College, Jersey City, NJ USA
  46.     terry@spcvxa.spc.edu    +1 201 915 9381
  47.