🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #10319

Re: Resources

#10319
From: Matt Dillon
Date: Wed, 16 Nov 1988 07:58
29 lines
1823 bytes
ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Writes:
:	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

	No No.  OpenResource() does *not* allocate anything, it simply
returns a pointer to the resource structure which is already in RAM.
The idea is to then use vectors in that resource (like a library) to do the 
actual allocation and deallocation of various items the resource controls.

	A given resource name accessed by OpenResource() is likely to
arbitrate several resources.  For example, arbitration of the 4 floppy
drives is done by a single resource.  Arbitration of the serial port,
parallel port, and other associated bits is all done with call vectors
in the misc.resource .  The two cia resources (ciaa, ciab) each arbitrate
all the various interrupt sources and control functions individually.
Not only does OpenResource() NOT guarentee exclusive access, it also makes
little sense for it to do so.

						-Matt
Technical Details
Message-ID: <8811160758.AA26103@postgres.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!pacbell!ames!pasteur!ucbvax!POSTGRES.BERKELEY.EDU!dillon

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!pacbell!ames!pasteur!ucbvax!POSTGRES.BERKELEY.EDU!dillon
From: dillon@POSTGRES.BERKELEY.EDU (Matt Dillon)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Resources
Message-ID: <8811160758.AA26103@postgres.Berkeley.EDU>
Date: 16 Nov 88 07:58:19 GMT
Sender: usenet@ucbvax.BERKELEY.EDU
Lines: 29