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:
@@ -1,6 +1,6 @@
|
||||
#include <mango/arg.h>
|
||||
#include <mango/libc/string.h>
|
||||
#include <mango/libc/ctype.h>
|
||||
#include <kernel/arg.h>
|
||||
#include <kernel/libc/string.h>
|
||||
#include <kernel/libc/ctype.h>
|
||||
|
||||
static char g_cmdline[CMDLINE_MAX + 1] = {0};
|
||||
|
||||
|
||||
13
kernel/bsp.c
13
kernel/bsp.c
@@ -1,9 +1,10 @@
|
||||
#include <mango/bsp.h>
|
||||
#include <mango/printk.h>
|
||||
#include <mango/sched.h>
|
||||
#include <mango/util.h>
|
||||
#include <mango/vm-object.h>
|
||||
#include <mango/vm-region.h>
|
||||
#include <kernel/bsp.h>
|
||||
#include <kernel/handle.h>
|
||||
#include <kernel/printk.h>
|
||||
#include <kernel/sched.h>
|
||||
#include <kernel/util.h>
|
||||
#include <kernel/vm-object.h>
|
||||
#include <kernel/vm-region.h>
|
||||
|
||||
#define BOOTSTRAP_STACK_SIZE 0x10000
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <mango/clock.h>
|
||||
#include <mango/printk.h>
|
||||
#include <mango/compiler.h>
|
||||
#include <kernel/clock.h>
|
||||
#include <kernel/printk.h>
|
||||
#include <kernel/compiler.h>
|
||||
|
||||
static clock_ticks_t ticks_per_sec = 0;
|
||||
volatile clock_ticks_t clock_ticks = 0;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <mango/console.h>
|
||||
#include <mango/queue.h>
|
||||
#include <mango/locks.h>
|
||||
#include <mango/libc/string.h>
|
||||
#include <kernel/console.h>
|
||||
#include <kernel/queue.h>
|
||||
#include <kernel/locks.h>
|
||||
#include <kernel/libc/string.h>
|
||||
|
||||
static struct queue consoles;
|
||||
static spin_lock_t consoles_lock = SPIN_LOCK_INIT;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <mango/cpu.h>
|
||||
#include <mango/percpu.h>
|
||||
#include <mango/bitmap.h>
|
||||
#include <kernel/cpu.h>
|
||||
#include <kernel/percpu.h>
|
||||
#include <kernel/bitmap.h>
|
||||
|
||||
DECLARE_BITMAP(cpu_available, CPU_MAX);
|
||||
DECLARE_BITMAP(cpu_online, CPU_MAX);
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#include <mango/handle.h>
|
||||
#include <mango/libc/string.h>
|
||||
#include <mango/object.h>
|
||||
#include <mango/vm.h>
|
||||
#include <kernel/handle.h>
|
||||
#include <kernel/libc/string.h>
|
||||
#include <kernel/object.h>
|
||||
#include <kernel/sched.h>
|
||||
#include <kernel/util.h>
|
||||
#include <kernel/vm.h>
|
||||
|
||||
/* depth=3 gives a maximum of ~66.6 million handles */
|
||||
#define MAX_TABLE_DEPTH 3
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <mango/locks.h>
|
||||
#include <mango/object.h>
|
||||
#include <mango/queue.h>
|
||||
#include <kernel/locks.h>
|
||||
#include <kernel/object.h>
|
||||
#include <kernel/queue.h>
|
||||
|
||||
#define HAS_OP(obj, opname) ((obj)->ob_type->ob_ops.opname)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include <mango/cpu.h>
|
||||
#include <mango/libc/stdio.h>
|
||||
#include <mango/machine/panic.h>
|
||||
#include <mango/printk.h>
|
||||
#include <mango/sched.h>
|
||||
#include <kernel/cpu.h>
|
||||
#include <kernel/libc/stdio.h>
|
||||
#include <kernel/machine/panic.h>
|
||||
#include <kernel/printk.h>
|
||||
#include <kernel/sched.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
static int has_panicked = 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <mango/percpu.h>
|
||||
#include <mango/cpu.h>
|
||||
#include <mango/vm.h>
|
||||
#include <kernel/percpu.h>
|
||||
#include <kernel/cpu.h>
|
||||
#include <kernel/vm.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <mango/printk.h>
|
||||
#include <mango/locks.h>
|
||||
#include <mango/console.h>
|
||||
#include <mango/libc/stdio.h>
|
||||
#include <kernel/printk.h>
|
||||
#include <kernel/locks.h>
|
||||
#include <kernel/console.h>
|
||||
#include <kernel/libc/stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#define LOG_BUFFER_SIZE 0x40000
|
||||
|
||||
Reference in New Issue
Block a user