From owner-p4-projects@FreeBSD.ORG Mon Apr 10 19:44:18 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 06F9D16A426; Mon, 10 Apr 2006 19:44:18 +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 A11AC16A424 for ; Mon, 10 Apr 2006 19:44:17 +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 89F1343D49 for ; Mon, 10 Apr 2006 19:44:16 +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 k3AJiGPA062983 for ; Mon, 10 Apr 2006 19:44:16 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k3AJiGIZ062980 for perforce@freebsd.org; Mon, 10 Apr 2006 19:44:16 GMT (envelope-from jhb@freebsd.org) Date: Mon, 10 Apr 2006 19:44:16 GMT Message-Id: <200604101944.k3AJiGIZ062980@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 94945 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: Mon, 10 Apr 2006 19:44:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=94945 Change 94945 by jhb@jhb_slimer on 2006/04/10 19:44:00 Reduce diff with CVS. Affected files ... .. //depot/projects/smpng/sys/kern/kern_mutex.c#122 edit Differences ... ==== //depot/projects/smpng/sys/kern/kern_mutex.c#122 (text+ko) ==== @@ -455,7 +455,7 @@ int line) { #if defined(SMP) && !defined(NO_ADAPTIVE_MUTEXES) - struct thread *owner; + volatile struct thread *owner; #endif uintptr_t v; #ifdef KTR @@ -551,16 +551,8 @@ if (m != &Giant && TD_IS_RUNNING(owner)) { #endif turnstile_release(&m->mtx_object); - - /* - * Expanded TD_IS_RUNNING so that we could force - * the compiler to not cache owner->td_state. - * Otherwise, we wouldn't notice when the owning - * thread stopped running. - */ while (mtx_rawowner(m) == owner && - ((volatile struct thread *)owner)->td_state == - TDS_RUNNING) { + TD_IS_RUNNING(owner)) { cpu_spinwait(); } continue;