home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d2xx
/
d284
/
filetest.lha
/
FileTest
/
ReadMe
< prev
next >
Wrap
Text File
|
1989-11-27
|
2KB
|
45 lines
This routine is used to recursively decend the file system tree from
a specified directory location, reading the files into memory
(if they will fit) as it goes. I wrote this to try to isolate a
problem I was having with a GVP030 board when used with SETCPU's
FASTROM option and a SCSI hard disk interfaced with a 2090 card.
Dave H:
This program will walk the directory tree of a disk allocating
and freeing memory buffers and reading in each file as it goes.
By selecting the "mode" level you can specify which of these
operations will be done. As well you can specify several
delays to be taken between the Open/Read/Close calls. I tested
this in two modes:
1) SETCPU CACHE BURST
2) SETCPU NOCACHE NOBURST FASTROM
The first of these (caches on (both inst and data) and no fastrom)
worked fine in all tests, the second (nocaches, but fastrom is on)
only worked with modes 0, 1 and 2, but when mode 3 was used it would
hang (cli/mouse movement lock up, but NEVER a guru or task held) at
some point in the file tree. By changing the first delay parameter
(del) you can change where in the file tree the hang occurs (I
tested values of 0, 10, 30, 40, 50 and 100) however the position of
the hang is not predictable for different delays (the hang occurred
at an earlier point with delay == 100 than with and other delay). By
changing the second delay parameter it is possible to get the system
to work (see below). When I included the "#ifdef TEST" lines it
appeared that the Read() call is where the lockup takes place.
mytest c2: 3 0 5 hung
mytest c2: 3 0 25 hung
mytest c2: 3 5 25 worked sometimes, hung other times
mytest c2: 3 25 5 hung
mytest c2: 3 25 0 hung
mytest c2: 3 5 5 hung
mytest c2: 3 0 0 hung
Perhaps the system is returning from the Open() call too soon and
the Read() then gets confused by an incorrectly/incompletely
opened file? It also appears that the system is returning from the
Read() call before it completes since the scanning (files/sec)
is faser for the "3 25 5" case than the "3 5 25" case.