Add zpcpu_get_cpu() that converts base pointer of UMA_ZPCPU_ZONE

to a pointer private to a given cpuid.

Sponsored by:	Nginx, Inc.
This commit is contained in:
Gleb Smirnoff 2014-02-10 19:47:14 +00:00
parent 2ccd462b16
commit 9188e408cc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261722

View File

@ -210,6 +210,13 @@ zpcpu_get(void *base)
return ((char *)(base) + sizeof(struct pcpu) * curcpu);
}
static inline void *
zpcpu_get_cpu(void *base, int cpu)
{
return ((char *)(base) + sizeof(struct pcpu) * cpu);
}
/*
* Machine dependent callouts. cpu_pcpu_init() is responsible for
* initializing machine dependent fields of struct pcpu, and