tim@nucleus.amd.com (Tim Olson) (03/05/90)
I am currently porting MINIX to an architecture (the Am29000) which has the ability to generate synchronous exceptions, such as a TLB miss which may deliver a STACK_FAULT signal to grow the stack, or other synchronous exceptions which need to be signalled with SIGSEGV, SIGFPE, SIGILL, etc. In going through the signal code, I found that the inform() routine in kernel/system.c checks to see if MM can receive a message before trying to send it. However, if it isn't ready, inform() just returns. Since the process that caused the signal was never unready()'ed, it will be restarted, either regenerating the exception again and again, or skipping over it. It seems to me that a process which generates a synchronous exception should be unready()'ed until the signal is handled. One possibility is to unready() the process and add a new state in the proc flags field -- SYNC_SIG -- which will get set before inform() is called, to prevent that process from being run until the signal is finally handled. That flag bit will be turned off and the process ready()'ed in a manner analogous to the NO_MAP flag. What have others done in this area? It seems to me that the "protected 286" port may have encountered this problem, but I am currently working from stock 1.2 sources, so I don't know if this problem has already been addressed or not. -- Tim Olson Advanced Micro Devices (tim@amd.com)