home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20941 < prev    next >
Encoding:
Text File  |  1993-01-07  |  1.4 KB  |  39 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!news.univie.ac.at!chx400!bernina!bernina!neeri
  3. From: neeri@iis.ethz.ch (Matthias Neeracher)
  4. Subject: Re: Proper way to do Self-Modifying code?
  5. In-Reply-To: kent@lloyd.Camex.COM's message of Tue, 05 Jan 1993 16:31:38 EST
  6. Message-ID: <NEERI.93Jan7232329@iis.ethz.ch>
  7. Sender: news@bernina.ethz.ch (USENET News System)
  8. Organization: Integrated Systems Laboratory, ETH, Zurich
  9. References: <wfFp_jO00WB707kGgq@andrew.cmu.edu> <1993Jan4.120353.16699@kth.se>
  10.     <1993Jan05.163138.20910@lloyd.Camex.COM>
  11. Date: Thu, 7 Jan 1993 22:23:29 GMT
  12. Lines: 25
  13.  
  14. In article <1993Jan05.163138.20910@lloyd.Camex.COM>, kent@lloyd.Camex.COM (Kent Borg) writes:
  15. > Yes, trivial, so instead consider my post as follows: How should one
  16. > find one's A5 world from within a sleep queue procedure?
  17.  
  18. I have never written a sleep queue proc, but wouldn't the following work ?
  19.  
  20. TYPE TheBigSleep =
  21.    RECORD
  22.       sleepy :        SleepQRec;
  23.       wonderfulWorld: A5WorldPtr; /* Whatever you want */
  24.    END;
  25. ...
  26. valium : TheBigSleep;
  27. ...
  28. SleepQInstall(@valium);
  29.  
  30. According to TFM, your sleep routine will be called with a pointer to
  31. valium in A0 that it can cast to the appropriate type. Am I missing anything ?
  32.  
  33. Matthias
  34.  
  35. -----
  36. Matthias Neeracher                                      neeri@iis.ethz.ch
  37.   "I wouldn't recommend sex, drugs or insanity for everyone, but
  38.    they've always worked for me." -- Hunter S. Thompson
  39.