svn commit: r192430 - user/kmacy/releng_7_2_fcs/sys/kern

Kip Macy kmacy at FreeBSD.org
Wed May 20 07:11:47 UTC 2009


Author: kmacy
Date: Wed May 20 07:11:46 2009
New Revision: 192430
URL: http://svn.freebsd.org/changeset/base/192430

Log:
  don't set prio if argument is zero

Modified:
  user/kmacy/releng_7_2_fcs/sys/kern/kern_kthread.c

Modified: user/kmacy/releng_7_2_fcs/sys/kern/kern_kthread.c
==============================================================================
--- user/kmacy/releng_7_2_fcs/sys/kern/kern_kthread.c	Wed May 20 07:01:36 2009	(r192429)
+++ user/kmacy/releng_7_2_fcs/sys/kern/kern_kthread.c	Wed May 20 07:11:46 2009	(r192430)
@@ -92,9 +92,6 @@ kthread_create_pri_v(void (*func)(void *
 	if (newpp != NULL)
 		*newpp = p2;
 
-	if (prio == 0)
-		prio = PVM; /* XXX compatibility :-{ */
-
 	/* this is a non-swapped system process */
 	PROC_LOCK(p2);
 	p2->p_flag |= P_SYSTEM | P_KTHREAD;
@@ -106,8 +103,10 @@ kthread_create_pri_v(void (*func)(void *
 	memcpy(p2->p_comm, comm, sizeof(p2->p_comm));
 	td = FIRST_THREAD_IN_PROC(p2);
 	memcpy(td->td_name, comm, sizeof(td->td_name));
-	td->td_base_pri  = prio;
-	td->td_priority  = prio;
+	if (prio != 0) {
+		td->td_base_pri  = prio;
+		td->td_priority  = prio;
+	}
 	
 	/* call the processes' main()... */
 	cpu_set_fork_handler(td, func, arg);


More information about the svn-src-user mailing list