Date: Fri, 27 Feb 2015 12:38:25 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279356 - head/sys/kern Message-ID: <201502271238.t1RCcPkw057011@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502271238.t1RCcPkw057011>