[comp.sys.amiga] Amiga Roadblocks to User Friendliness

iphwk%MTSUNIX1.BITNET@cunyvm.cuny.edu (Bill Kinnersley) (12/12/88)

[In "Re: Amiga Roadblocks to User Friendliness", Peter da Silva said:]
:
: This is a good one. It's easy enough to see if an assign hasn't been made
: yet, and to make it. Dissect my "mounted" program to see how to scan
: through the mountlist. Looking for assigns is as easy as looking for
: volumes.
:
:             Peter da Silva  `-_-'  peter@sugar.uu.net
:
This reminds me of an OS improvement that I would really like to see..a
safer way to look through the DeviceList.  We were just mentioning the
hazards of snooping through the list of Screens in IntuitionBase, and how
LockIBase() needs to be used to gain exclusive access to those structures.
Likewise there should be a LockDOSBase() or whatever for safe access to
DOS structures.

        Case in point:  a while back when I was working on Hackbench I
wanted to put up a disk icon on the screen whenever a new floppy had been
inserted.  So I listened for DISKINSERTED and DISKREMOVED Intuimessages,
and then went to examine the DeviceList.  But it was too soon!  DOS itself
was still messing with the DeviceList and I'd find an inconsistent state.
Only solution I could come with up at the time (and I raised the question
here on c.s.a.) was to twiddle my thumbs for a few milliseconds and hope
that DOS had got its act together by then.  Yuck!


--
--Bill Kinnersley
  Physics Department   Montana State University    Bozeman, MT 59717
  INTERNET: iphwk@terra.oscs.montana.edu      BITNET: IPHWK@MTSUNIX1