git: b6d10a962448 - main - sched.h: Include <sys/pcpu.h> unconditionally

From: Olivier Certner <olce_at_FreeBSD.org>
Date: Wed, 07 Oct 2026 08:42:51 UTC
The branch main has been updated by olce:

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

commit b6d10a962448bf03400dd381b2083d1f547f869c
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2026-10-06 09:27:55 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2026-10-07 08:41:49 +0000

    sched.h: Include <sys/pcpu.h> unconditionally
    
    Even if SCHED_STATS is not defined, this header is necessary to provide
    a definition of 'curthread' used in sched_pin() and sched_unpin().
    
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
---
 sys/sys/sched.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index 60afd2344eef..75c56a864076 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -70,9 +70,7 @@
 #ifdef _KERNEL
 
 #include <sys/types.h>
-#ifdef SCHED_STATS
 #include <sys/pcpu.h>
-#endif
 #include <sys/linker_set.h>
 #include <sys/sdt.h>