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:
glebius 2014-02-10 19:47:14 +00:00
parent 6e1e57220f
commit 855454fa07

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