diff options
author | peter <peter@FreeBSD.org> | 2001-09-10 04:28:58 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-09-10 04:28:58 +0000 |
commit | 96b9a12bd20f300ee8fcf003538e8aa560536c2c (patch) | |
tree | fc0a72b711cffb263f307a3b8d70ec96d56e263b /sys/kern/kern_fork.c | |
parent | 86ba2579206ed1037ff3581eaaf5854b2821fae9 (diff) | |
download | FreeBSD-src-96b9a12bd20f300ee8fcf003538e8aa560536c2c.zip FreeBSD-src-96b9a12bd20f300ee8fcf003538e8aa560536c2c.tar.gz |
Rip some well duplicated code out of cpu_wait() and cpu_exit() and move
it to the MI area. KSE touched cpu_wait() which had the same change
replicated five ways for each platform. Now it can just do it once.
The only MD parts seemed to be dealing with fpu state cleanup and things
like vm86 cleanup on x86. The rest was identical.
XXX: ia64 and powerpc did not have cpu_throw(), so I've put a functional
stub in place.
Reviewed by: jake, tmm, dillon
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index dea8ff0..af154c3 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -235,7 +235,7 @@ fork1(p1, flags, procp) * certain parts of a process from itself. */ if ((flags & RFPROC) == 0) { - vm_fork(p1, 0, flags); + vm_forkproc(p1, 0, flags); /* * Close all file descriptors. @@ -412,7 +412,7 @@ again: /* * Duplicate sub-structures as needed. * Increase reference counts on shared objects. - * The p_stats and p_sigacts substructs are set in vm_fork. + * The p_stats and p_sigacts substructs are set in vm_forkproc. */ p2->p_flag = 0; mtx_lock_spin(&sched_lock); @@ -461,7 +461,7 @@ again: PROC_LOCK(p1); bcopy(p1->p_procsig, p2->p_procsig, sizeof(*p2->p_procsig)); p2->p_procsig->ps_refcnt = 1; - p2->p_sigacts = NULL; /* finished in vm_fork() */ + p2->p_sigacts = NULL; /* finished in vm_forkproc() */ } if (flags & RFLINUXTHPN) p2->p_sigparent = SIGUSR1; @@ -573,7 +573,7 @@ again: * Finish creating the child process. It will return via a different * execution path later. (ie: directly into user mode) */ - vm_fork(p1, p2, flags); + vm_forkproc(p1, p2, flags); if (flags == (RFFDG | RFPROC)) { cnt.v_forks++; |