Files
SystemPaw3/paw/stos/ob/init.c
T
Chloe M. bc11f9b58f stos: ob: Add object cache groundwork
Signed-off-by: Chloe M. <chloe@mensia.org>
2026-06-25 17:50:43 +00:00

38 lines
681 B
C

/*
* Copyright (c) 2026, Chloe M.
* Provided under the BSD-3 clause.
*
* Description: Object manager init funcs
* Author: Chloe M.
*/
#include <ob/object.h>
#include <ob/cache.h>
#include <ex/trace.h>
#include <ke/knot.h>
#define DTRACE(Fmt, ...) \
TRACE("[ OB ]: " Fmt, ##__VA_ARGS__)
/* Globals */
static ST_OBJECT *RootDirectory;
OBJECT_CACHE gObCache;
VOID
ObInitManager(VOID)
{
ST_STATUS Status;
ObInitCache(&gObCache);
Status = ObCreateDirectory(
"/",
&RootDirectory
);
if (Status != STATUS_SUCCESS) {
KeKnot(KNOT_MISC, "failed to initialize object manager\n");
}
DTRACE("mounted root at '/'\n");
}