Path: utzoo!attcan!uunet!super!udel!gatech!purdue!decwrl!labrea!agate!bionet!apple!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga.tech Subject: Re: Resources Summary: Beating a dead horse. Message-ID: <7636@well.UUCP> Date: 12 Nov 88 07:50:16 GMT References: <1947@van-bc.UUCP> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: Spam Creation and Distribution Squad, Terra Linda, CA Lines: 33 Quote: "Why should I trust you?" -- Shrinker "Because I've got the gun!" -- Avon In article <1947@van-bc.UUCP> lphillips@lpami.van-bc.UUCP (Larry Phillips) writes: >Well, if you _must_ claim the serial port in non-shared mode, I suppose >you would use GetMiscResource() and FreeMiscResource, though I don't >know the details. [ ... ] Okay, I'm gonna ask this question again. I'm not deaf; I have heard the answer before. How do you CloseResource() something that you've OpenResource()d? The answer has been, "You don't," but this answer has some interesting implications. Suppose I want the use of one of the CIA ports. I would call OpenResource() on the relevant port, and dance on it. While I'm dancing on it, it'd be real nice if I could be sure that no one else will be dancing on it. One would think that the OpenResource()/CloseResource() pair (if it existed) would arbitrate access to the relevant resource. However, since there is no CloseResource(), this implies that, when I OpenResource() something, someone else can OpenResource() the same thing, and we can fight in most entertaining ways, sure to cause crashing of programs and pulling of hairs. So. Given the lack of CloseResource(), does this mean that OpenResource() does not guarantee exclusive access? If this is so, how does one arbitrate the access to "resources" to prevent collisions? _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape INET: well!ewhac@ucbvax.Berkeley.EDU \_ -_ Recumbent Bikes: UUCP: pacbell > !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor