Initialize p_md.md_kernnest to 1 for newly fork'd processes since they

start off in the kernel.
This commit is contained in:
John Baldwin 2001-04-26 23:52:40 +00:00
parent 21aaa49c89
commit bf4c03d0e9
3 changed files with 18 additions and 0 deletions
sys
alpha/alpha
powerpc

@ -208,6 +208,12 @@ cpu_fork(p1, p2, flags)
up->u_pcb.pcb_context[2] = (u_long) p2; /* s2: a1 */
up->u_pcb.pcb_context[7] =
(u_int64_t)fork_trampoline; /* ra: assembly magic */
#ifdef SMP
/*
* We start off at a nesting level of 1 within the kernel.
*/
p2->p_md.md_kernnest = 1;
#endif
}
}

@ -208,6 +208,12 @@ cpu_fork(p1, p2, flags)
up->u_pcb.pcb_context[2] = (u_long) p2; /* s2: a1 */
up->u_pcb.pcb_context[7] =
(u_int64_t)fork_trampoline; /* ra: assembly magic */
#ifdef SMP
/*
* We start off at a nesting level of 1 within the kernel.
*/
p2->p_md.md_kernnest = 1;
#endif
}
}

@ -208,6 +208,12 @@ cpu_fork(p1, p2, flags)
up->u_pcb.pcb_context[2] = (u_long) p2; /* s2: a1 */
up->u_pcb.pcb_context[7] =
(u_int64_t)fork_trampoline; /* ra: assembly magic */
#ifdef SMP
/*
* We start off at a nesting level of 1 within the kernel.
*/
p2->p_md.md_kernnest = 1;
#endif
}
}