diff options
author | jeff <jeff@FreeBSD.org> | 2002-10-12 05:32:24 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-10-12 05:32:24 +0000 |
commit | ef4d4e378e012b3efd909e2abc5c1ddcf38faee7 (patch) | |
tree | 69991942d3c51153d9210031e7380779edf05aaf /sys/kern/kern_fork.c | |
parent | cf318b70e5aa88b25cdf3d47eacce75c5aa889db (diff) | |
download | FreeBSD-src-ef4d4e378e012b3efd909e2abc5c1ddcf38faee7.zip FreeBSD-src-ef4d4e378e012b3efd909e2abc5c1ddcf38faee7.tar.gz |
- 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
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 0af883b..9c2169a 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. */ |