aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2002-10-12 05:32:24 +0000
committerJeff Roberson <jeff@FreeBSD.org>2002-10-12 05:32:24 +0000
commitb43179fbe815b81e2d6bb729ffcb08e8f0a143da (patch)
tree69991942d3c51153d9210031e7380779edf05aaf /sys/kern/kern_fork.c
parentbd26dcd10398fc7436ec5f3ee1a35ef5a7ae54dd (diff)
downloadsrc-b43179fbe815b81e2d6bb729ffcb08e8f0a143da.tar.gz
src-b43179fbe815b81e2d6bb729ffcb08e8f0a143da.zip
- Create a new scheduler api that is defined in sys/sched.h
- Begin moving scheduler specific functionality into sched_4bsd.c - Replace direct manipulation of scheduler data with hooks provided by the new api. - Remove KSE specific state modifications and single runq assumptions from kern_switch.c Reviewed by: -arch
Notes
Notes: svn path=/head/; revision=104964
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 0af883b8e476..9c2169a713e0 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -53,6 +53,7 @@
#include <sys/proc.h>
#include <sys/pioctl.h>
#include <sys/resourcevar.h>
+#include <sys/sched.h>
#include <sys/syscall.h>
#include <sys/vnode.h>
#include <sys/acct.h>
@@ -515,6 +516,12 @@ again:
p2->p_sflag = PS_INMEM;
if (p1->p_sflag & PS_PROFIL)
startprofclock(p2);
+ /*
+ * Allow the scheduler to adjust the priority of the child and
+ * parent while we hold the sched_lock.
+ */
+ sched_fork(td->td_ksegrp, kg2);
+
mtx_unlock_spin(&sched_lock);
p2->p_ucred = crhold(td->td_ucred);
td2->td_ucred = crhold(p2->p_ucred); /* XXXKSE */
@@ -635,12 +642,6 @@ again:
}
/*
- * set priority of child to be that of parent.
- * XXXKSE this needs redefining..
- */
- kg2->kg_estcpu = td->td_ksegrp->kg_estcpu;
-
- /*
* This begins the section where we must prevent the parent
* from being swapped.
*/