diff options
Diffstat (limited to 'kernel/include')
-rw-r--r-- | kernel/include/idt.h | 2 | ||||
-rw-r--r-- | kernel/include/kmalloc.h | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/kernel/include/idt.h b/kernel/include/idt.h index b697dc3..9415c8e 100644 --- a/kernel/include/idt.h +++ b/kernel/include/idt.h @@ -58,6 +58,8 @@ #define EX_INTEL_RESERVED_13 30 // No #define EX_INTEL_RESERVED_14 31 // No +#define EFLAGS_IF (0x1 << 9) + struct registers { uint32_t ds; // Data segment selector uint32_t edi, esi, ebp, useless_esp, ebx, edx, ecx, eax; // Pushed by pusha. diff --git a/kernel/include/kmalloc.h b/kernel/include/kmalloc.h new file mode 100644 index 0000000..a409865 --- /dev/null +++ b/kernel/include/kmalloc.h @@ -0,0 +1,14 @@ +#pragma once + +#include <stdint.h> +#include <stddef.h> + +// Kernel memory allocator : one slab allocator for shared memory +// Thread-safe. + +void kmalloc_setup(); + +void* kmalloc(size_t sz); +void kfree(void* ptr); + +/* vim: set ts=4 sw=4 tw=0 noet :*/ |