stos: ex: Add per-cpu pool allocator groundwork
Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#include <hal/kpcr.h>
|
||||
#include <hal/intr.h>
|
||||
#include <ex/trace.h>
|
||||
#include <ex/pool.h>
|
||||
#include <ke/knot.h>
|
||||
#include <machine/cpuid.h>
|
||||
#include <machine/idt.h>
|
||||
#include <stdef.h>
|
||||
@@ -131,3 +133,22 @@ HalKpcrP1Init(KPCR *Kpcr)
|
||||
: "memory"
|
||||
);
|
||||
}
|
||||
|
||||
VOID
|
||||
HalKpcrP2Init(KPCR *Kpcr)
|
||||
{
|
||||
ST_STATUS Status;
|
||||
|
||||
if (Kpcr == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
Status = ExPoolInit(&Kpcr->AllocPool);
|
||||
if (Status != STATUS_SUCCESS) {
|
||||
KeKnot(
|
||||
KNOT_MISC,
|
||||
"failed to initialize pool for cpu%d\n",
|
||||
Kpcr->CoreId
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user