Path: utzoo!attcan!uunet!husc6!bloom-beacon!apple!amdahl!rtech!mtxinu!taniwha!paul From: paul@taniwha.UUCP (Paul Campbell) Newsgroups: comp.sys.mac.programmer Subject: Re: Help With VBL Tasks Message-ID: <321@taniwha.UUCP> Date: 22 Jan 89 18:48:39 GMT References: <8343@orstcs.CS.ORST.EDU> <27628@ucbvax.BERKELEY.EDU> <451@internal.Apple.COM> <6347@hoptoad.uucp> Reply-To: paul@taniwha.UUCP (Paul Campbell) Organization: Taniwha Systems Design, Oakland Lines: 34 In article <6347@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >interrupt driven code that is not switched by MultiFinder. VBL tasks >only run when their application has the processor, but not so things >like socket listeners or custom interrupt handlers. I still don't know >any way around this except for stashing a copy of your A5 in >code-relative space, which is explicitly forbidden (with good reason) >by Tech Note #2. I'm not even sure that Apple acknowledges that this Yes! Yes! I'm forever running into this problem, when you want to find a 'global' object in the Mac (ie the context of an INIT to communicate with it, or some completion routines and their apps) often it's a real pain. The real problem is one of 'naming' how can I have two items agree on a name to find a common item if they don't have common context, often the problem can be solved by extending the parameter block involved (for example VBL's or completion routines). I once had to go to the extent of writing a driver (don't ask!) so that I had a common 'name' that could be accessed by apps, a cdev and another driver! In many ways this may be a better way to do it in the long run (ie with whatever they end up doing with the MMU etc) because it uses a trap to get from local context to the global context, and the trap handling code (the driver's Control routine) can do all the inter-context manipulation (but then this is starting to sound a lot like how people hack around this stuff in Unix, which is after all my bias ....). On the other hand somethimes Apple do do it right! The 'A1Param' in the slot SIntInstall is a good example, one can carry as much baggage as one likes there, simply by using it as a pointer to a locked data structure. Paul -- Paul Campbell ..!{unisoft|mtxinu}!taniwha!paul (415)420-8179 Taniwha Systems Design, Oakland CA "Read my lips .... no GNU taxes" - as if they could tax free software