The branch main has been updated by kib:

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

commit 0b474a48dc5866d94988ed3af24019d7074f5e5b
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2026-01-24 06:00:50 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-01-29 18:11:55 +0000

    sys/sched.h: add SCHED_STAT_DECLARE()
    
    Tested by:      pho
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D54831
---
 sys/sys/sched.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/sys/sched.h b/sys/sys/sched.h
index 635e8283561a..8f383840192f 100644
--- a/sys/sys/sched.h
+++ b/sys/sys/sched.h
@@ -214,6 +214,10 @@ SYSINIT(name, SI_SUB_LAST, SI_ORDER_MIDDLE, name ## 
_add_proc, NULL);
 #define        SCHED_STAT_DEFINE(name, descr)                                  
\
     DPCPU_DEFINE(unsigned long, name);                                 \
     SCHED_STAT_DEFINE_VAR(name, &DPCPU_NAME(name), descr)
+
+#define        SCHED_STAT_DECLARE(name)                                        
\
+    DPCPU_DECLARE(unsigned long, name);
+
 /*
  * Sched stats are always incremented in critical sections so no atomic
  * is necessary to increment them.
@@ -222,6 +226,7 @@ SYSINIT(name, SI_SUB_LAST, SI_ORDER_MIDDLE, name ## 
_add_proc, NULL);
 #else
 #define        SCHED_STAT_DEFINE_VAR(name, descr, ptr)
 #define        SCHED_STAT_DEFINE(name, descr)
+#define        SCHED_STAT_DECLARE(name)
 #define SCHED_STAT_INC(var)                    (void)0
 #endif
 

Reply via email to