PERFORCE change 61258 for review

John Baldwin jhb at FreeBSD.org
Thu Sep 9 12:51:38 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=61258

Change 61258 by jhb at 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++;


More information about the p4-projects mailing list