Article View: comp.sys.amiga.tech
Article #10560Re: Finding The Workbench Screen
From: Leo 'Bols Ewhac' Schwab
Date: Mon, 12 Dec 1988 05:24
Date: Mon, 12 Dec 1988 05:24
31 lines
2280 bytes
2280 bytes
In article <13231@ncoast.UUCP> jamiep@ncoast.UUCP (Jamie Purdon) writes:
>*The* place to begin scanning the screen structs is at
> IntuitionBase->FirstScreen
>
>Unless you're simply checking if you're the "upfront" screen,
>you should probably forbid/permit around any "screen structure walking".
>
>(finishing DIGIpaint2....;-)
If you're working on DigiPaintII, then you should be aware that
using Forbid/Permit is not *neccesarily* the correct way to inspect public
system structures. I noticed GrabANIM doing the same thing with
IntuitionBase, and a big bell went off in my head (JimM's words can be
pretty infectious, you know...).
The correct way to look at IntuitionBase is to first call
LockIBase(). This keeps Intuition from fooling with IntuitionBase while
you're looking at it. You may think Forbid() does this, but if Intuition
just happens to be in the middle of a modification when it gets switched
out in time for you to say Forbid(), then IntuitionBase is in an
inconsistent state, and you could get propelled into The Twilight Zone.
The Exec memory free list is arbitrated with Forbid/Permit (isn't
it?). IntuitionBase is arbitrated with LockIBase/UnlockIBase(). If you
don't use the right locking mechanism, your program will lose one day.
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
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
Technical Details
Message-ID:
<7907@well.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!pacbell!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!well!ewhacReferences:
<1982@van-bc.UUCP> <7796@well.UUCP> <13231@ncoast.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!clyde!att!pacbell!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga.tech Subject: Re: Finding The Workbench Screen Summary: Walking Intuition system structures without protection. Message-ID: <7907@well.UUCP> Date: 12 Dec 88 05:24:42 GMT References: <1982@van-bc.UUCP> <7796@well.UUCP> <13231@ncoast.UUCP> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: The Comic Relief Machine Lines: 31 Quote: "Nancy, I've had it up to my kiester with this thing." -- R. Reagan