Article View: comp.sys.amiga.tech
Article #11742Re: Disk Questions for WorkBench replacement project
From: Robert R. Burns
Date: Thu, 09 Mar 1989 20:32
Date: Thu, 09 Mar 1989 20:32
31 lines
2068 bytes
2068 bytes
In article ... (Yen Yuanchi Hsieh) writes:
>c60c-1ea@web-4g.berkeley.edu (David Navas) wrote:
>>1) How does one go about locking the correct disk if two or more
>>have the same number.
>Fortunately, I've fixed (hopefully) that problem by doing some real nasty,
>stuff with the DeviceList. I just pull the correct volume-node to the top
>and then do my regular Lock call. I don't even want to think what will happen
>with 1.4 ....
1. This solution does not feel multi-tasking safe. What if two people are
trying this technique at the same time?
a. Note: all access to the DeviceList must be done within Forbid/Permit
protection.
b. Lock will Wait, and thus break any Forbid. That's when the second
person using this technique can swizzle you.
2. My first suggestion is to match the ambiguous volume name to the
non-ambiguous device name by scanning the device list and matching the
"task" fields. This suggestion falls flat when applied to handlers that
have no corresponding device.
3. My robust suggestion is to recognize that the "task" fields are actually
the process message ports for the associated file handler, and to invoke
the lock directly using the packet interface available at this port. I
leave the details to the reader... :-)
--
Bob Burns, amiga!kodiak "five year . _
| /_ _|. _ | Commodore __ service _/ \_ |_) _ |_ _ )'
|<(_)(_)|(_\|< /\ | ||| _` /\ pin" `.(5).' |_)(_\| )(_\ |
| \ Software ___/..\|\/|||__|/..\___ /.^.\ Faith
Technical Details
Message-ID:
<3462@amiga.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!amiga!kodiakReferences:
<21173@agate.BERKELEY.EDU> <821@microsoft.UUCP> <21279@agate.BERKELEY.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!amiga!kodiak From: kodiak@amiga.UUCP (Robert R. Burns) Newsgroups: comp.sys.amiga.tech Subject: Re: Disk Questions for WorkBench replacement project Message-ID: <3462@amiga.UUCP> Date: 9 Mar 89 20:32:36 GMT References: <21173@agate.BERKELEY.EDU> <821@microsoft.UUCP> <21279@agate.BERKELEY.EDU> Reply-To: kodiak@tooter.UUCP (Robert R. Burns) Organization: Commodore-Amiga Inc, Los Gatos CA Lines: 31