home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!rpi!gatech!news.ans.net!cmcl2!panix!rmah
- From: rmah@panix.com (Robert Mah)
- Subject: Problem with patch to HFSDispatch
- Message-ID: <1992Dec22.182710.26751@panix.com>
- Date: Tue, 22 Dec 1992 18:27:10 GMT
- Organization: PANIX Public Access Unix, NYC
- Lines: 33
-
- In an extension that works fine on most systems, but some people seem to
- be getting freezes when they shut down/restart their machine. I'm not
- sure, but I think it might be related to my patching HFSDispatch.
-
- I'm using register a1 to hold the adress of the real trap -- is there
- something wrong with this? Anyone care to comment?
-
- Some code...
-
- /*
- * We need to trap whenever the user moves a directory (selector 5).
- */
- pascal void FSDispatchPatch()
- {
- asm{
- movem.l a4, -(sp) ; save registers
- lea main, a4 ; setup globals
- cmp.w #5, d0 ; if not CatMove
- bne.s @1
- move.w #1, gNeedsUpdate ; set the gNeedsUpdate flag
- @1 move.l realHFSDispatchTrap, a1 ; grab the addr of the real thing
- movem.l (sp)+, a4 ; restore registers
- jmp (a1) ; jump to real HFSDispatch
- }
- }
-
- Happy Holdiays,
- Rob
- --
- [--------------------------------------------------]
- [ Robert S. Mah | "Every day an adventure, ]
- [ rmah@panix.com | every moment a challenge." ]
- [--------------------------------------------------]
-