git: 1ea187f8a1bf - stable/13 - callout: Make cc_cpu local to kern_timeout.c

Mark Johnston markj at FreeBSD.org
Fri Jul 23 11:56:44 UTC 2021


The branch stable/13 has been updated by markj:

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

commit 1ea187f8a1bf16a0798c3bad39bf063667e1f4d0
Author:     Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-07-16 02:40:23 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-07-23 11:49:49 +0000

    callout: Make cc_cpu local to kern_timeout.c
    
    No functional change intended.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit c1aff72cfa30fa27efe867a4feb667f1963e8cf7)
---
 sys/kern/kern_timeout.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index cc1521adf151..d9cf2784f642 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -190,14 +190,14 @@ struct callout_cpu {
 #define	cc_migration_time(cc, dir)	cc->cc_exec_entity[dir].ce_migration_time
 #define	cc_migration_prec(cc, dir)	cc->cc_exec_entity[dir].ce_migration_prec
 
-struct callout_cpu cc_cpu[MAXCPU];
+static struct callout_cpu cc_cpu[MAXCPU];
 #define	CPUBLOCK	MAXCPU
 #define	CC_CPU(cpu)	(&cc_cpu[(cpu)])
 #define	CC_SELF()	CC_CPU(PCPU_GET(cpuid))
 #else
-struct callout_cpu cc_cpu;
-#define	CC_CPU(cpu)	&cc_cpu
-#define	CC_SELF()	&cc_cpu
+static struct callout_cpu cc_cpu;
+#define	CC_CPU(cpu)	(&cc_cpu)
+#define	CC_SELF()	(&cc_cpu)
 #endif
 #define	CC_LOCK(cc)	mtx_lock_spin(&(cc)->cc_lock)
 #define	CC_UNLOCK(cc)	mtx_unlock_spin(&(cc)->cc_lock)


More information about the dev-commits-src-all mailing list