The branch main has been updated by mav:

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

commit 8db1669959ceebdc60a7d402830663953bf32818
Author:     Alexander Motin <m...@freebsd.org>
AuthorDate: 2021-09-22 02:13:33 +0000
Commit:     Alexander Motin <m...@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;
_______________________________________________
dev-commits-src-main@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"

Reply via email to