From owner-p4-projects@FreeBSD.ORG Thu Jul 13 15:47:55 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4E86B16A4E0; Thu, 13 Jul 2006 15:47:55 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 151CE16A4DE for ; Thu, 13 Jul 2006 15:47:55 +0000 (UTC) (envelope-from howardsu@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 600B543D55 for ; Thu, 13 Jul 2006 15:47:54 +0000 (GMT) (envelope-from howardsu@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6DFlsH1035411 for ; Thu, 13 Jul 2006 15:47:54 GMT (envelope-from howardsu@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6DFls1C035406 for perforce@freebsd.org; Thu, 13 Jul 2006 15:47:54 GMT (envelope-from howardsu@FreeBSD.org) Date: Thu, 13 Jul 2006 15:47:54 GMT Message-Id: <200607131547.k6DFls1C035406@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to howardsu@FreeBSD.org using -f From: Howard Su To: Perforce Change Reviews Cc: Subject: PERFORCE change 101477 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jul 2006 15:47:55 -0000 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);