Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!lll-lcc!pyramid!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga Subject: Re: Need info about exceptions: epilogue Message-ID: <4624@cbmvax.UUCP> Date: 1 Sep 88 08:44:37 GMT References: <7683@cit-vax.Caltech.Edu> <615@faui44.informatik.uni-erlangen.de> <1757@munsell.UUCP> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 38 In article <1757@munsell.UUCP> jdj@munsell.UUCP (Joel Jennings) writes: > 3) I cannot use software or hardware interrupts, since I won't be able > to do anything useful during an interrupt. > > [I agree - whoever wrote this section of the OS must have failed > or forgotten their intro to OS course.] Actually no. This is not at all unusual for OS interrupt handlers (as opposed to unix signal handlers, which are NOT even close to interrupts). However, it is easy to have an interrupt signal another task to wake up, or to copy info into a preallocated area of memory, then signal a task to wake up and write it out. > [Actually, I would have generated the checkpoint process from the > CLI and have the two processes communicate via a public message > port. This seems a lot cleaner than trying to generate one > process from within another. Or am I missing something?] Sure, it'll work. > 5) I can setup an exception handler for the timer message: when the > message is delivered, my process will be interrupted and forced > to call the specofied routine. > > [Just what I was looking for (my thanks go to Bill Kinnersly!). > Howcome this isn't mentioned in the documentation?] Because I believe (not verified!) that that is not safe. In particular, you could get an exception while in an OS critical section, so doing many things may not be safe (similar to interrupts). If you are sure you're safe, this could be done. The reason it isn't stressed is that it was designed for such uses, then people realized that given the way the OS was designed, it wasn't safe to use in the way Unix signal handlers are used. -- Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup