kernel: separate headers into kernel and user headers

all kernel headers have been moved from include/mango to include/kernel
and include definitions that are only relevant to kernel-space.

any definitions that are relevant to both kernel- and user-space
(i.e. type definitions, syscall IDs) have been moved to
include/mango within libmango.
This commit is contained in:
2026-02-19 18:54:48 +00:00
parent e3dd48a0fa
commit 6019c9307d
117 changed files with 1361 additions and 3845 deletions

View File

@@ -1,10 +1,10 @@
#include <mango/clock.h>
#include <mango/cpu.h>
#include <mango/machine/thread.h>
#include <mango/object.h>
#include <mango/printk.h>
#include <mango/sched.h>
#include <mango/vm-region.h>
#include <kernel/clock.h>
#include <kernel/cpu.h>
#include <kernel/machine/thread.h>
#include <kernel/object.h>
#include <kernel/printk.h>
#include <kernel/sched.h>
#include <kernel/vm-region.h>
extern kern_status_t setup_kernel_task(void);
extern kern_status_t setup_idle_task(void);

View File

@@ -1,6 +1,6 @@
#include <mango/sched.h>
#include <mango/percpu.h>
#include <mango/cpu.h>
#include <kernel/sched.h>
#include <kernel/percpu.h>
#include <kernel/cpu.h>
#define PRIO_MASK(p) (((uint32_t)1) << (p))
#define FIRST_PRIO(m) (m > 0 ? (PRIO_MAX - __builtin_clz(m) - 1) : -1)

View File

@@ -1,12 +1,14 @@
#include <mango/clock.h>
#include <mango/cpu.h>
#include <mango/handle.h>
#include <mango/libc/stdio.h>
#include <mango/locks.h>
#include <mango/object.h>
#include <mango/printk.h>
#include <mango/sched.h>
#include <mango/vm-region.h>
#include <kernel/channel.h>
#include <kernel/clock.h>
#include <kernel/cpu.h>
#include <kernel/handle.h>
#include <kernel/libc/stdio.h>
#include <kernel/locks.h>
#include <kernel/object.h>
#include <kernel/printk.h>
#include <kernel/sched.h>
#include <kernel/util.h>
#include <kernel/vm-region.h>
#define TASK_CAST(p) OBJECT_C_CAST(struct task, t_base, &task_type, p)

View File

@@ -1,8 +1,8 @@
#include <mango/bitmap.h>
#include <mango/cpu.h>
#include <mango/machine/thread.h>
#include <mango/object.h>
#include <mango/sched.h>
#include <kernel/bitmap.h>
#include <kernel/cpu.h>
#include <kernel/machine/thread.h>
#include <kernel/object.h>
#include <kernel/sched.h>
#define THREAD_CAST(p) OBJECT_C_CAST(struct thread, thr_base, &thread_type, p)

View File

@@ -1,7 +1,7 @@
#include <mango/sched.h>
#include <mango/printk.h>
#include <mango/cpu.h>
#include <mango/clock.h>
#include <kernel/sched.h>
#include <kernel/printk.h>
#include <kernel/cpu.h>
#include <kernel/clock.h>
static void timeout_expiry(struct timer *timer)
{

View File

@@ -1,5 +1,5 @@
#include <mango/sched.h>
#include <mango/cpu.h>
#include <kernel/cpu.h>
#include <kernel/sched.h>
void wait_item_init(struct wait_item *item, struct thread *thr)
{

View File

@@ -1,7 +1,7 @@
#include <mango/sched.h>
#include <mango/vm.h>
#include <mango/util.h>
#include <mango/cpu.h>
#include <kernel/sched.h>
#include <kernel/vm.h>
#include <kernel/util.h>
#include <kernel/cpu.h>
static struct worker_pool *__global_worker_pool = NULL;