PERFORCE change 101477 for review
Howard Su
howardsu at FreeBSD.org
Thu Jul 13 15:47:55 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=101477
Change 101477 by howardsu at su_laptop on 2006/07/13 15:47:35
Fix building. I am not sure how to merge davidxu's scheduling
related code. I just comment them out.
Affected files ...
.. //depot/projects/dtrace/src/sys/kern/kern_thr.c#5 edit
Differences ...
==== //depot/projects/dtrace/src/sys/kern/kern_thr.c#5 (text+ko) ====
@@ -141,6 +141,7 @@
default:
return (EINVAL);
}
+ }
/* Initialize our td and new ksegrp.. */
newtd = thread_alloc();
@@ -193,6 +194,7 @@
}
}
+#if 0
newkg = ksegrp_alloc();
bzero(&newkg->kg_startzero,
__rangeof(struct ksegrp, kg_startzero, kg_endzero));
@@ -205,7 +207,16 @@
mtx_lock_spin(&sched_lock);
thread_link(newtd, newkg);
PROC_UNLOCK(p);
+#else
+ PROC_LOCK(td->td_proc);
+ td->td_proc->p_flag |= P_HADTHREADS;
+ newtd->td_sigmask = td->td_sigmask;
+ mtx_lock_spin(&sched_lock);
+ thread_link(newtd, p);
+ PROC_UNLOCK(p);
+#endif
+#if 0
/* let the scheduler know about these things. */
sched_fork_thread(td, newtd);
if (sched != NULL) {
@@ -235,6 +246,9 @@
panic("sched policy");
}
}
+#else
+ sched_fork(td, newtd);
+#endif
TD_SET_CAN_RUN(newtd);
/* if ((flags & THR_SUSPENDED) == 0) */
setrunqueue(newtd, SRQ_BORING);
More information about the p4-projects
mailing list