home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!camex!lloyd!kent
- From: kent@lloyd.Camex.COM (Kent Borg)
- Subject: Re: Proper way to do Self-Modifying code?
- Message-ID: <1993Jan08.125014.4740@lloyd.Camex.COM>
- Organization: Camex Inc., Boston MA
- References: <1993Jan4.120353.16699@kth.se> <1993Jan05.163138.20910@lloyd.Camex.COM> <NEERI.93Jan7232329@iis.ethz.ch>
- Date: Fri, 08 Jan 1993 12:50:14 EST
- Lines: 40
-
- In article <NEERI.93Jan7232329@iis.ethz.ch> neeri@iis.ethz.ch (Matthias Neeracher) writes:
- >In article <1993Jan05.163138.20910@lloyd.Camex.COM>, kent@lloyd.Camex.COM (Kent Borg) writes:
- >> Yes, trivial, so instead consider my post as follows: How should one
- >> find one's A5 world from within a sleep queue procedure?
- >
- >I have never written a sleep queue proc, but wouldn't the following work ?
- >
- >TYPE TheBigSleep =
- > RECORD
- > sleepy : SleepQRec;
- > wonderfulWorld: A5WorldPtr; /* Whatever you want */
- > END;
- >...
- >valium : TheBigSleep;
- >...
- >SleepQInstall(@valium);
- >
- >According to TFM, your sleep routine will be called with a pointer to
- >valium in A0 that it can cast to the appropriate type. Am I missing anything ?
-
- No, you are not missing anything, I was the one missing. Sure looks
- like that will work.
-
- Um, though a healthy dose of "RTFM" is appropiate here, I think there
- is also a little of another effect: "It is always in the *first* place
- you look, you just weren't looking carefully enough when you looked
- there because you didn't yet know how lost it was."
-
- I spotted the A0 note, realized that it was not a pointer to my A5,
- nor was it a refcon, so I looked further. By the time I realized that
- there was no A5 or refcon sitting waiting for me I had forgotten that
- I might use A0 to *find* one. Stupid I am sometimes.
-
- Thanks for the help.
-
- --
- Kent Borg kent@camex.com or kentborg@aol.com (when it is *working*)
- H:(617) 776-6899 W:(617) 426-3577
- As always, things look better when some costs are left out.
- -Economist 3-28-92 p. 94
-