Path: utzoo!attcan!uunet!husc6!bloom-beacon!apple!rutgers!njin!princeton!udel!mmdf From: iphwk%MTSUNIX1.BITNET@cunyvm.cuny.edu (Bill Kinnersley) Newsgroups: comp.sys.amiga Subject: Re: Need info on exceptions Message-ID: <3793@louie.udel.EDU> Date: 23 Aug 88 13:27:21 GMT Sender: mmdf@udel.EDU Lines: 22 [In "Re: Need info on exceptions", "Morgan W. Jones" said:] > > In article <1754@munsell.UUCP> jdj@munsell.UUCP (Joel Jennings) writes: > >I am looking for a way to cause my program to take an exception periodically > >so that it can write out intermediate results of a long calculation* (see > > One approach that seems reasonable would be to send a message to the > timer.device asking it to send you a message in ten minutes (600 secs). > Arrange that the reply port that it sends to generates a software > interrupt of priority higher than your program (so that it preempts > it), and this swi can delete the message, ask that another message > be sent in ten minutes, and write out your intermediate data. Of > course, you'd have to make sure that a swi can do things like delete > messages, send messages, open files, etc. > Unfortunately it can't. "To avoid serious problems, the interrupt routine must not use any of the memory allocation or deallocation functions"--RKM. That's apparently because critical system code is surrounded by Forbid(), but not Disable(). That doesn't seem to leave much that interrupts can do. Once again, we're stuck with polling (and this on a multitasking OS).