This procedure is only called if “u.u_signal[n]” was found by “issig” to have an even value. If this value is found (4051) to be non-zero, it is taken as the address of a user mode function which has to be executed.
Reset “u.u_signal[n]” except the case where the interrupt for an illegal instruction or trace trap;
Calculate the user space addresses of the lower of two words which are to be inserted into the user mode stack ...
Call “grow” to check the current user mode stack size, and to extend it (downwards!) if necessary;
Put the values of the processor status register and the program counter which were captured at the time of the “trap” or hardware interrupt (in the case of a “clock” interrupt) into the user stack, and update the “remembered” values of r6, r7 and the processor status word. Upon returning to user mode, execution will resume at the beginning of the designated procedure. When this procedure returns, the procedure which was originally interrupted will be resumed;
If “u.u_signal[n]” is zero, then for the interrupt types listed, generate a core image via the procedure “core”;
Store a value in “u.u_arg[0]” composed of the low order byte of the remembered value of r0, and of “n”, which records the interrupt type and whether a core image was successfully created;
Call “exit” for the process to terminate itself.