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:
parent
6e1e57220f
commit
855454fa07
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user