Date: Thu, 9 Sep 2004 19:51:37 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 61258 for review Message-ID: <200409091951.i89JpbOT024135@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/module.h> #include <sys/mutex.h> #include <sys/proc.h> +#include <sys/sched.h> #include <sys/unistd.h> #include <sys/sx.h> #include <sys/sysctl.h> @@ -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 <sys/mutex.h> #include <sys/proc.h> #include <sys/unistd.h> +#include <sys/sched.h> #include <sys/sema.h> #include <sys/sx.h> #include <sys/sysctl.h> @@ -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++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409091951.i89JpbOT024135>