From owner-p4-projects@FreeBSD.ORG Thu Sep 9 19:51:37 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 88D3916A4D0; Thu, 9 Sep 2004 19:51:37 +0000 (GMT) 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 63D4216A4CE for ; Thu, 9 Sep 2004 19:51:37 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56C6143D5C for ; Thu, 9 Sep 2004 19:51:37 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i89JpbSl024138 for ; Thu, 9 Sep 2004 19:51:37 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i89JpbOT024135 for perforce@freebsd.org; Thu, 9 Sep 2004 19:51:37 GMT (envelope-from jhb@freebsd.org) Date: Thu, 9 Sep 2004 19:51:37 GMT Message-Id: <200409091951.i89JpbOT024135@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Subject: PERFORCE change 61258 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2004 19:51:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=61258 Change 61258 by jhb@jhb_slimer on 2004/09/09 19:51:05 - Use sched_prio() rather than fondling td_priority directly. - Fix evtest so it compiles while I'm at it. Affected files ... .. //depot/projects/smpng/sys/modules/crash/crash.c#13 edit .. //depot/projects/smpng/sys/modules/evtest/evtest.c#21 edit Differences ... ==== //depot/projects/smpng/sys/modules/crash/crash.c#13 (text+ko) ==== @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -330,7 +331,7 @@ cv_init(&event_cv, "crash"); td = FIRST_THREAD_IN_PROC(p); mtx_lock_spin(&sched_lock); - td->td_priority = PRI_MIN_IDLE; + sched_prio(td, PRI_MIN_IDLE); TD_SET_CAN_RUN(td); setrunqueue(td, SRQ_BORING); mtx_unlock_spin(&sched_lock); ==== //depot/projects/smpng/sys/modules/evtest/evtest.c#21 (text+ko) ==== @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -387,9 +388,9 @@ return (error); td = FIRST_THREAD_IN_PROC(threads[i].ti_p); mtx_lock_spin(&sched_lock); - td->td_priority = PRI_MIN_IDLE; + sched_prio(td, PRI_MIN_IDLE); TD_SET_CAN_RUN(td); - setrunqueue(td); + setrunqueue(td, SRQ_BORING); mtx_unlock_spin(&sched_lock); mtx_lock(&event_mtx); num_threads++;