From owner-svn-src-head@freebsd.org Fri Nov 17 23:27:07 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD7A3DE59D8; Fri, 17 Nov 2017 23:27:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A7E179C1D; Fri, 17 Nov 2017 23:27:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vAHNR6Ld077602; Fri, 17 Nov 2017 23:27:06 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAHNR65d077600; Fri, 17 Nov 2017 23:27:06 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201711172327.vAHNR65d077600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 17 Nov 2017 23:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325963 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 325963 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2017 23:27:07 -0000 Author: mjg Date: Fri Nov 17 23:27:06 2017 New Revision: 325963 URL: https://svnweb.freebsd.org/changeset/base/325963 Log: locks: fix compilation issues without SMP or KDTRACE_HOOKS Modified: head/sys/kern/kern_mutex.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Fri Nov 17 23:25:06 2017 (r325962) +++ head/sys/kern/kern_mutex.c Fri Nov 17 23:27:06 2017 (r325963) @@ -462,9 +462,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) struct mtx *m; struct turnstile *ts; uintptr_t tid; -#ifdef ADAPTIVE_MUTEXES struct thread *owner; -#endif #ifdef KTR int cont_logged = 0; #endif @@ -628,6 +626,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) */ #ifdef KDTRACE_HOOKS sleep_time -= lockstat_nsecs(&m->lock_object); +#endif +#ifndef ADAPTIVE_MUTEXES + owner = mtx_owner(m); #endif MPASS(owner == mtx_owner(m)); turnstile_wait(ts, owner, TS_EXCLUSIVE_QUEUE); Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Fri Nov 17 23:25:06 2017 (r325962) +++ head/sys/kern/kern_sx.c Fri Nov 17 23:27:06 2017 (r325963) @@ -520,8 +520,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t t #endif #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) uintptr_t state; - int extra_work; #endif + int extra_work = 0; if (SCHEDULER_STOPPED()) return (0); @@ -880,8 +880,8 @@ _sx_slock_hard(struct sx *sx, int opts, const char *fi #endif #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) uintptr_t state; - int extra_work; #endif + int extra_work = 0; if (SCHEDULER_STOPPED()) return (0);