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
2ccd462b16
commit
9188e408cc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261722
@ -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