Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!emory!ra!ra.msstate.edu From: krn1@ra.msstate.edu (Ken Newton) Newsgroups: comp.sys.mac.programmer Subject: async write to disk (MPW C) Message-ID: <1016@ra.MsState.Edu> Date: 28 Jan 91 16:55:30 GMT Sender: usenet@ra.MsState.Edu Distribution: na Organization: Mississippi State University Lines: 25 Nntp-Posting-Host: newton.ph.msstate.edu I am working on a real-time application to run on a Mac fx that requires very fast data collection to disk. The program is in MPW C and I use the following calls to try to speed up the write and to allow the data collection to proceed while the disk is writing. ioerr = PBAllocContig( myPB, false); /* allocates enough contig space */ in loop: collect a block of data (13K bytes) wait for ioResult == 0 from last write PBWrite(myPB, true); /* async true -- DOES NOT SEEM to work */ end loop The write is taking about 50 msec and returning with ioResult already 0. I.e. the call does not get done in async fashion. For this to work for our application, the call needs to return in less than 1 msec and (probably) has to use the DMA capabilities of the fx. Any suggestions? This is my first venture in to MPW C programming after many years with Pascal on Lisa and Mac. Ken Newton Mississippi State University krn1@ra.msstate.edu krn1@msstate.bitnet krn1@vax.dial.msstate.edu