kernel: add basic proc outline

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-15 14:50:46 -04:00
commit 1b8fe6b24d
4 changed files with 67 additions and 0 deletions

View file

@ -2,4 +2,5 @@
obj-y += device.o
obj-y += sg.o
obj-y += block/
obj-y += proc/
obj-y += tty/

2
kernel/proc/Makefile Normal file
View file

@ -0,0 +1,2 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-y += proc.o

12
kernel/proc/proc.c Normal file
View file

@ -0,0 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <kernel/proc.h>
#include <kernel/slab.h>
mem_cache_t *proc_slab;
mem_cache_t *thread_slab;
void proc_init()
{
proc_slab = slab_create("proc_slab", sizeof(struct proc), 1 * MB, 8);
thread_slab = slab_create("thread_slab", sizeof(struct thread), 1 * MB, 8);
}