diff options
author | peter <peter@FreeBSD.org> | 2002-01-05 09:35:50 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-01-05 09:35:50 +0000 |
commit | d0a39cc230c0913e147d6d457395dacacde596b3 (patch) | |
tree | 000b086daa494cae67749c9e15635aace521e8ad /sys/kern/subr_pcpu.c | |
parent | 1ce407b6755fc202866c4e1e2887b37a6fc09a9a (diff) | |
download | FreeBSD-src-d0a39cc230c0913e147d6d457395dacacde596b3.zip FreeBSD-src-d0a39cc230c0913e147d6d457395dacacde596b3.tar.gz |
Add a per-cpu variable, cpumask, the preshifted equivalent of 1 << cpuid.
We use this around the place a lot.
Diffstat (limited to 'sys/kern/subr_pcpu.c')
-rw-r--r-- | sys/kern/subr_pcpu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c index 8db9e1f..132e957 100644 --- a/sys/kern/subr_pcpu.c +++ b/sys/kern/subr_pcpu.c @@ -68,6 +68,7 @@ pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) KASSERT(cpuid >= 0 && cpuid < MAXCPU, ("pcpu_init: invalid cpuid %d", cpuid)); pcpu->pc_cpuid = cpuid; + pcpu->pc_cpumask = 1 << cpuid; cpuid_to_pcpu[cpuid] = pcpu; SLIST_INSERT_HEAD(&cpuhead, pcpu, pc_allcpu); cpu_pcpu_init(pcpu, cpuid, size); |