Fixed interrupt unmasking for child processes which I broke in
rev.1.10 two years ago. Children continued to run at splhigh() after returning from vm_fork(). This mainly affected kernel processes and init. For ordinary processes, interrupts are normally unmasked a few instructions later after fork() returns (it may be important for syscall() not to reschedule the child processes). Kernel processes had workarounds for the problem. Init manages to start because some routines "know" that it is safe to go to sleep despite their caller starting them at a high ipl. Then its ipl gets fixed on its first normal return from a syscall.
This commit is contained in:
parent
b6b9dfa17e
commit
3e2bca9e04
@ -343,6 +343,7 @@ fork1(p1, flags, retval)
|
||||
* Child process. Set start time and get to work.
|
||||
*/
|
||||
microtime(&runtime);
|
||||
(void) spl0();
|
||||
p2->p_stats->p_start = runtime;
|
||||
p2->p_acflag = AFORK;
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user