callout: Make cc_cpu local to kern_timeout.c

No functional change intended.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mark Johnston 2021-07-15 22:40:23 -04:00
parent 7a9bc8a82e
commit c1aff72cfa

View File

@ -190,14 +190,14 @@ struct callout_cpu {
#define cc_migration_time(cc, dir) cc->cc_exec_entity[dir].ce_migration_time #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 #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 CPUBLOCK MAXCPU
#define CC_CPU(cpu) (&cc_cpu[(cpu)]) #define CC_CPU(cpu) (&cc_cpu[(cpu)])
#define CC_SELF() CC_CPU(PCPU_GET(cpuid)) #define CC_SELF() CC_CPU(PCPU_GET(cpuid))
#else #else
struct callout_cpu cc_cpu; static struct callout_cpu cc_cpu;
#define CC_CPU(cpu) &cc_cpu #define CC_CPU(cpu) (&cc_cpu)
#define CC_SELF() &cc_cpu #define CC_SELF() (&cc_cpu)
#endif #endif
#define CC_LOCK(cc) mtx_lock_spin(&(cc)->cc_lock) #define CC_LOCK(cc) mtx_lock_spin(&(cc)->cc_lock)
#define CC_UNLOCK(cc) mtx_unlock_spin(&(cc)->cc_lock) #define CC_UNLOCK(cc) mtx_unlock_spin(&(cc)->cc_lock)