PERFORCE change 103374 for review
John Birrell
jb at FreeBSD.org
Mon Aug 7 09:47:41 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=103374
Change 103374 by jb at jb_freebsd2 on 2006/08/07 09:47:13
Fix a merge problem with the NOKSE (aka bike_sched) case.
Affected files ...
.. //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#12 edit
Differences ...
==== //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#12 (text+ko) ====
@@ -913,8 +913,19 @@
void
sched_exit(struct proc *p, struct thread *td)
{
+#ifdef KSE
sched_exit_ksegrp(FIRST_KSEGRP_IN_PROC(p), td);
sched_exit_thread(FIRST_THREAD_IN_PROC(p), td);
+#else
+ struct thread *parent = FIRST_THREAD_IN_PROC(p);
+
+ CTR3(KTR_SCHED, "sched_exit: %p(%s) prio %d",
+ td, td->td_proc->p_comm, td->td_priority);
+
+ parent->td_estcpu = ESTCPULIM(parent->td_estcpu + td->td_estcpu);
+ if ((td->td_proc->p_flag & P_NOLOAD) == 0)
+ sched_load_rem();
+#endif
}
#ifdef KSE
@@ -939,10 +950,16 @@
void
sched_fork(struct thread *td, struct thread *childtd)
{
+#ifdef KSE
sched_fork_ksegrp(td, childtd->td_ksegrp);
sched_fork_thread(td, childtd);
+#else
+ childtd->td_estcpu = td->td_estcpu;
+ sched_newthread(childtd);
+#endif
}
+#ifdef KSE
void
sched_fork_ksegrp(struct thread *td, struct ksegrp *child)
{
@@ -955,6 +972,7 @@
{
sched_newthread(childtd);
}
+#endif
void
sched_nice(struct proc *p, int nice)
More information about the p4-projects
mailing list