uninline scheduler hooks.
This commit is contained in:
parent
fff95ff31d
commit
2975f576b9
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_synch.c,v 1.150 2005/10/02 17:51:27 chs Exp $ */
|
||||
/* $NetBSD: kern_synch.c,v 1.151 2005/10/06 07:02:14 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -76,7 +76,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.150 2005/10/02 17:51:27 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.151 2005/10/06 07:02:14 yamt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_ktrace.h"
|
||||
|
@ -1191,6 +1191,31 @@ suspendsched()
|
|||
proclist_unlock_read();
|
||||
}
|
||||
|
||||
/*
|
||||
* scheduler_fork_hook:
|
||||
*
|
||||
* Inherit the parent's scheduler history.
|
||||
*/
|
||||
void
|
||||
scheduler_fork_hook(struct proc *parent, struct proc *child)
|
||||
{
|
||||
|
||||
child->p_estcpu = parent->p_estcpu;
|
||||
}
|
||||
|
||||
/*
|
||||
* scheduler_wait_hook:
|
||||
*
|
||||
* Chargeback parents for the sins of their children.
|
||||
*/
|
||||
void
|
||||
scheduler_wait_hook(struct proc *parent, struct proc *child)
|
||||
{
|
||||
|
||||
/* XXX Only if parent != init?? */
|
||||
parent->p_estcpu = ESTCPULIM(parent->p_estcpu + child->p_estcpu);
|
||||
}
|
||||
|
||||
/*
|
||||
* Low-level routines to access the run queue. Optimised assembler
|
||||
* routines can override these.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sched.h,v 1.21 2005/05/29 21:19:12 christos Exp $ */
|
||||
/* $NetBSD: sched.h,v 1.22 2005/10/06 07:02:13 yamt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -206,27 +206,8 @@ void schedclock(struct lwp *);
|
|||
void sched_wakeup(__volatile const void *);
|
||||
void roundrobin(struct cpu_info *);
|
||||
|
||||
/*
|
||||
* scheduler_fork_hook:
|
||||
*
|
||||
* Inherit the parent's scheduler history.
|
||||
*/
|
||||
#define scheduler_fork_hook(parent, child) \
|
||||
do { \
|
||||
(child)->p_estcpu = (parent)->p_estcpu; \
|
||||
} while (/* CONSTCOND */ 0)
|
||||
|
||||
/*
|
||||
* scheduler_wait_hook:
|
||||
*
|
||||
* Chargeback parents for the sins of their children.
|
||||
*/
|
||||
#define scheduler_wait_hook(parent, child) \
|
||||
do { \
|
||||
/* XXX Only if parent != init?? */ \
|
||||
(parent)->p_estcpu = ESTCPULIM((parent)->p_estcpu + \
|
||||
(child)->p_estcpu); \
|
||||
} while (/* CONSTCOND */ 0)
|
||||
void scheduler_fork_hook(struct proc *, struct proc *);
|
||||
void scheduler_wait_hook(struct proc *, struct proc *);
|
||||
|
||||
#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
|
||||
#include <sys/lock.h>
|
||||
|
|
Loading…
Reference in New Issue