Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 2021 02:14:18 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 8db1669959ce - main - Fix build without SMP.
Message-ID:  <202109220214.18M2EIJk047078@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=8db1669959ceebdc60a7d402830663953bf32818

commit 8db1669959ceebdc60a7d402830663953bf32818
Author:     Alexander Motin <mav@FreeBSD.org>
AuthorDate: 2021-09-22 02:13:33 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2021-09-22 02:13:33 +0000

    Fix build without SMP.
    
    MFC after:      1 month
---
 sys/kern/sched_ule.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index 711119c84383..d1e4010d2ebe 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -2118,7 +2118,10 @@ sched_switch(struct thread *td, int flags)
 	struct td_sched *ts;
 	struct mtx *mtx;
 	int srqflag;
-	int cpuid, pickcpu, preempted;
+	int cpuid, preempted;
+#ifdef SMP
+	int pickcpu;
+#endif
 
 	THREAD_LOCK_ASSERT(td, MA_OWNED);
 
@@ -2126,11 +2129,13 @@ sched_switch(struct thread *td, int flags)
 	tdq = TDQ_SELF();
 	ts = td_get_sched(td);
 	sched_pctcpu_update(ts, 1);
+#ifdef SMP
 	pickcpu = (td->td_flags & TDF_PICKCPU) != 0;
 	if (pickcpu)
 		ts->ts_rltick = ticks - affinity * MAX_CACHE_LEVELS;
 	else
 		ts->ts_rltick = ticks;
+#endif
 	td->td_lastcpu = td->td_oncpu;
 	preempted = (td->td_flags & TDF_SLICEEND) == 0 &&
 	    (flags & SW_PREEMPT) != 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109220214.18M2EIJk047078>