git: a3d50144ccd7 - stable/13 - Fix build without SMP.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 21 Oct 2021 22:31:34 UTC
The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=a3d50144ccd7cdb0754efc8ff2c8b56d8abcc2d9 commit a3d50144ccd7cdb0754efc8ff2c8b56d8abcc2d9 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2021-09-22 02:13:33 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2021-10-21 22:24:35 +0000 Fix build without SMP. MFC after: 1 month (cherry picked from commit 8db1669959ceebdc60a7d402830663953bf32818) --- 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 e7de4a50bb93..d92436f70db2 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;