From owner-svn-src-head@FreeBSD.ORG Fri Feb 27 12:38:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1CF47DB; Fri, 27 Feb 2015 12:38:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 9D726600; Fri, 27 Feb 2015 12:38:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1RCcP3g057012; Fri, 27 Feb 2015 12:38:25 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1RCcPkw057011; Fri, 27 Feb 2015 12:38:25 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201502271238.t1RCcPkw057011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 27 Feb 2015 12:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279356 - head/sys/kern X-SVN-Group: head 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.18-1 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, 27 Feb 2015 12:38:25 -0000 Author: andrew Date: Fri Feb 27 12:38:24 2015 New Revision: 279356 URL: https://svnweb.freebsd.org/changeset/base/279356 Log: sched_random is only called for SMP, only define it there. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Fri Feb 27 12:23:30 2015 (r279355) +++ head/sys/kern/sched_ule.c Fri Feb 27 12:38:24 2015 (r279356) @@ -302,7 +302,6 @@ static int sched_interact_score(struct t static void sched_interact_update(struct thread *); static void sched_interact_fork(struct thread *); static void sched_pctcpu_update(struct td_sched *, int); -static int sched_random(void); /* Operations on per processor queues */ static struct thread *tdq_choose(struct tdq *); @@ -357,6 +356,7 @@ SDT_PROBE_DEFINE(sched, , , remain__cpu) SDT_PROBE_DEFINE2(sched, , , surrender, "struct thread *", "struct proc *"); +#ifdef SMP /* * We need some randomness. Implement the classic Linear Congruential * generator X_{n+1}=(aX_n+c) mod m. These values are optimized for @@ -372,6 +372,7 @@ static int sched_random() *rndptr = rnd; return(rnd); } +#endif /* * Print the threads waiting on a run-queue.