From owner-p4-projects@FreeBSD.ORG Wed Apr 12 18:59:48 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E19BC16A406; Wed, 12 Apr 2006 18:59:47 +0000 (UTC) X-Original-To: perforce@freebsd.org 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 9CB9716A401 for ; Wed, 12 Apr 2006 18:59:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38B5843D79 for ; Wed, 12 Apr 2006 18:59:44 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k3CIxhXO015500 for ; Wed, 12 Apr 2006 18:59:44 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3CIxhGA015494 for perforce@freebsd.org; Wed, 12 Apr 2006 18:59:43 GMT (envelope-from jhb@freebsd.org) Date: Wed, 12 Apr 2006 18:59:43 GMT Message-Id: <200604121859.k3CIxhGA015494@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 Cc: Subject: PERFORCE change 95074 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2006 18:59:48 -0000 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);