Replace the recent scheduler mods with calls to scheduler_{fork,wait}_hook(),

(inlined) so scheduler functionality can be kept in a single .h/.c set.
Also, the wait hook has changed the way it clips the scheduler history.
This commit is contained in:
ross 1999-02-23 02:57:18 +00:00
parent f39415fb66
commit 6803dbddbb
2 changed files with 6 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_exit.c,v 1.63 1999/01/23 22:23:19 sommerfe Exp $ */
/* $NetBSD: kern_exit.c,v 1.64 1999/02/23 02:57:18 ross Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -104,6 +104,7 @@
#include <sys/acct.h>
#include <sys/filedesc.h>
#include <sys/signalvar.h>
#include <sys/sched.h>
#ifdef SYSVSHM
#include <sys/shm.h>
#endif
@ -452,11 +453,7 @@ loop:
wakeup((caddr_t)p->p_pptr);
return (0);
}
/* Charge us for our child's sins */
curproc->p_estcpu = min(curproc->p_estcpu +
p->p_estcpu, UCHAR_MAX);
scheduler_wait_hook(curproc, p);
p->p_xstat = 0;
ruadd(&q->p_stats->p_cru, p->p_ru);
pool_put(&rusage_pool, p->p_ru);

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_fork.c,v 1.52 1999/01/23 22:23:19 sommerfe Exp $ */
/* $NetBSD: kern_fork.c,v 1.53 1999/02/23 02:57:18 ross Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -58,6 +58,7 @@
#include <sys/acct.h>
#include <sys/ktrace.h>
#include <sys/vmmeter.h>
#include <sys/sched.h>
#include <sys/syscallargs.h>
@ -315,13 +316,7 @@ again:
ktradref(p2);
}
#endif
/*
* set priority of child to be that of parent
* XXX should move p_estcpu into the region of struct proc which gets
* copied.
*/
p2->p_estcpu = p1->p_estcpu;
scheduler_fork_hook(p1, p2);
/*
* This begins the section where we must prevent the parent