Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Apr 2006 18:59:43 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 95074 for review
Message-ID:  <200604121859.k3CIxhGA015494@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95074

Change 95074 by jhb@jhb_slimer on 2006/04/12 18:59:16

	Don't adjust the thread's priority in msleep (and tsleep) if the
	priority value is 0.

Affected files ...

.. //depot/projects/smpng/sys/kern/kern_synch.c#100 edit

Differences ...

==== //depot/projects/smpng/sys/kern/kern_synch.c#100 (text+ko) ====

@@ -195,9 +195,11 @@
 	/*
 	 * Adjust this thread's priority.
 	 */
-	mtx_lock_spin(&sched_lock);
-	sched_prio(td, priority & PRIMASK);
-	mtx_unlock_spin(&sched_lock);
+	if (priority & PRIMASK != 0) {
+		mtx_lock_spin(&sched_lock);
+		sched_prio(td, priority & PRIMASK);
+		mtx_unlock_spin(&sched_lock);
+	}
 
 	if (timo && catch)
 		rval = sleepq_timedwait_sig(ident);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604121859.k3CIxhGA015494>