Path: utzoo!attcan!uunet!husc6!mailrus!ames!claris!apple!goldman From: goldman@Apple.COM (Phil Goldman) Newsgroups: comp.sys.mac.programmer Subject: Re: Patching Trap Calling under Multifinder Keywords: patch trap multifinder Message-ID: <13192@apple.Apple.COM> Date: 2 Jul 88 05:33:51 GMT References: <1988Jun22.111251.394@mntgfx.mentor.com> <4778@hoptoad.uucp> <88Jun30.162844edt.539@neat.ai.toronto.edu> Reply-To: goldman@apple.apple.com.UUCP (Phil Goldman) Organization: Apple Computer Inc, Cupertino, CA Lines: 27 In article <88Jun30.162844edt.539@neat.ai.toronto.edu> dudek@ai.toronto.edu (Gregory Dudek) writes: > I am pretty sure that *IF* you de-install your patch on suspend >events (and make sure you don't miss one), you can get your A5 value from >the global "CurrentA5". You have to be extra careful with patchs that >could get called from interrupt routines, but the one you want isn't >one of those. > Every time a context switch occurs MultiFinder will swap out the current tasks's patches and swap in those for the new task. The tasks themselves know nothing about this. The task only gets a suspend event when a layer switch occurs, but many context switches will occur in between layer switches. Therefore, it is not necessary for the app to save and restore its own patches, nor is it possible. > A question I was wondering about, however, is how to install >a permanent patch while running under MultiFinder. As far as I know, >MF rips out your patches when the task ends. The MF developer's >package doesn't address this either, so any help would be appreciated. >(I am fearing it's impossible) MultiFinder will remove a task's patches when it quits. Therefore, it is necessary to do permanent trap patching in an INIT. -Phil Goldman Apple Computer