Date: Thu, 13 Jul 2006 15:47:54 GMT From: Howard Su <howardsu@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 101477 for review Message-ID: <200607131547.k6DFls1C035406@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=101477 Change 101477 by howardsu@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607131547.k6DFls1C035406>