Force includes to use absolute paths.

This commit is contained in:
Enrico Fraccaroli
2021-10-05 14:29:24 +02:00
parent 0c6a38e189
commit 18a2fd9baa
95 changed files with 351 additions and 627 deletions
+3 -3
View File
@@ -6,10 +6,10 @@
#include "link_access.h"
#include "multiboot.h"
#include "paging.h"
#include "module.h"
#include "mem/paging.h"
#include "sys/module.h"
#include "stdint.h"
#include "elf.h"
#include "elf/elf.h"
/// @defgroup bootloader Bootloader
/// @brief Set of functions and variables for booting the kernel.
+4 -4
View File
@@ -4,11 +4,11 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "panic.h"
#include "isr.h"
#include "idt.h"
#include "system/panic.h"
#include "descriptor_tables/isr.h"
#include "descriptor_tables/idt.h"
#include "stdio.h"
#include "debug.h"
#include "misc/debug.h"
// Default error messages for exceptions.
static const char *exception_messages[32] = {
+3 -3
View File
@@ -4,9 +4,9 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "debug.h"
#include "gdt.h"
#include "tss.h"
#include "misc/debug.h"
#include "descriptor_tables/gdt.h"
#include "descriptor_tables/tss.h"
/// The maximum dimension of the GDT.
#define GDT_SIZE 10
+3 -3
View File
@@ -4,9 +4,9 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "idt.h"
#include "gdt.h"
#include "isr.h"
#include "descriptor_tables/idt.h"
#include "descriptor_tables/gdt.h"
#include "descriptor_tables/isr.h"
/// @brief This function is in idt.asm.
/// @param idt_pointer Address of the idt.
+6 -6
View File
@@ -4,15 +4,15 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "isr.h"
#include "descriptor_tables/isr.h"
#include "scheduler.h"
#include "pic8259.h"
#include "printk.h"
#include "process/scheduler.h"
#include "hardware/pic8259.h"
#include "system/printk.h"
#include "assert.h"
#include "stdio.h"
#include "debug.h"
#include "idt.h"
#include "misc/debug.h"
#include "descriptor_tables/idt.h"
/// @brief Shared interrupt handlers, stored into a double-linked list.
typedef struct irq_struct_t {
+3 -3
View File
@@ -4,11 +4,11 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "tss.h"
#include "descriptor_tables/tss.h"
#include "string.h"
#include "debug.h"
#include "gdt.h"
#include "misc/debug.h"
#include "descriptor_tables/gdt.h"
static tss_entry_t kernel_tss;
+6 -6
View File
@@ -4,15 +4,15 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "fpu.h"
#include "isr.h"
#include "debug.h"
#include "devices/fpu.h"
#include "descriptor_tables/isr.h"
#include "misc/debug.h"
#include "string.h"
#include "assert.h"
#include "scheduler.h"
#include "process/scheduler.h"
#include "math.h"
#include "process.h"
#include "signal.h"
#include "process/process.h"
#include "system/signal.h"
/// Pointerst to the current thread using the FPU.
task_struct *thread_using_fpu = NULL;
+3 -3
View File
@@ -5,10 +5,10 @@
/// See LICENSE.md for details.
///! @cond Doxygen_Suppress
#include "pci.h"
#include "debug.h"
#include "devices/pci.h"
#include "misc/debug.h"
#include "string.h"
#include "port_io.h"
#include "io/port_io.h"
void pci_write_field(uint32_t device, int field, int size, uint32_t value)
{
+11 -11
View File
@@ -5,22 +5,22 @@
/// See LICENSE.md for details.
///! @cond Doxygen_Suppress
#include "ata.h"
#include "spinlock.h"
#include "drivers/ata.h"
#include "klib/spinlock.h"
#include "fcntl.h"
#include "vmem_map.h"
#include "list.h"
#include "mem/vmem_map.h"
#include "klib/list.h"
#include "stdio.h"
#include "isr.h"
#include "vfs.h"
#include "pci.h"
#include "debug.h"
#include "kheap.h"
#include "descriptor_tables/isr.h"
#include "fs/vfs.h"
#include "devices/pci.h"
#include "misc/debug.h"
#include "mem/kheap.h"
#include "assert.h"
#include "string.h"
#include "kernel.h"
#include "pic8259.h"
#include "port_io.h"
#include "hardware/pic8259.h"
#include "io/port_io.h"
#include "time.h"
// #define COMPLETE_SCHEDULER
+3 -3
View File
@@ -4,9 +4,9 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "fdc.h"
#include "video.h"
#include "port_io.h"
#include "drivers/fdc.h"
#include "io/video.h"
#include "io/port_io.h"
void fdc_disable_motor()
{
+8 -8
View File
@@ -4,17 +4,17 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "keyboard.h"
#include "drivers/keyboard/keyboard.h"
#include "port_io.h"
#include "pic8259.h"
#include "keymap.h"
#include "io/port_io.h"
#include "hardware/pic8259.h"
#include "drivers/keyboard/keymap.h"
#include "sys/bitops.h"
#include "video.h"
#include "debug.h"
#include "io/video.h"
#include "misc/debug.h"
#include "ctype.h"
#include "isr.h"
#include "scheduler.h"
#include "descriptor_tables/isr.h"
#include "process/scheduler.h"
/// A macro from Ivan to update buffer indexes.
#define STEP(x) (((x) == BUFSIZE - 1) ? 0 : ((x) + 1))
+1 -1
View File
@@ -4,7 +4,7 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "keymap.h"
#include "drivers/keyboard/keymap.h"
#include "string.h"
/// Identifies the current keymap type.
+3 -3
View File
@@ -6,9 +6,9 @@
///// See LICENSE.md for details.
/////! @cond Doxygen_Suppress
#include "mouse.h"
#include "pic8259.h"
#include "port_io.h"
#include "drivers/mouse.h"
#include "hardware/pic8259.h"
#include "io/port_io.h"
static uint8_t mouse_cycle = 0;
+4 -4
View File
@@ -4,13 +4,13 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "rtc.h"
#include "drivers/rtc.h"
#include "pic8259.h"
#include "hardware/pic8259.h"
#include "string.h"
#include "port_io.h"
#include "io/port_io.h"
#include "kernel.h"
#include "isr.h"
#include "descriptor_tables/isr.h"
#define CMOS_ADDR 0x70 ///< Addess where we need to write the Address.
#define CMOS_DATA 0x71 ///< Addess where we need to write the Data.
+7 -7
View File
@@ -7,17 +7,17 @@
/// Change the header.
#define __DEBUG_HEADER__ "[ELF ]"
#include "elf.h"
#include "elf/elf.h"
#include "scheduler.h"
#include "vmem_map.h"
#include "process.h"
#include "process/scheduler.h"
#include "mem/vmem_map.h"
#include "process/process.h"
#include "string.h"
#include "stddef.h"
#include "debug.h"
#include "misc/debug.h"
#include "stdio.h"
#include "slab.h"
#include "vfs.h"
#include "mem/slab.h"
#include "fs/vfs.h"
/// @brief Reads the program header from file.
/// @param file The file from which we extract the program header.
+6 -6
View File
@@ -5,16 +5,16 @@
/// See LICENSE.md for details.
#include "assert.h"
#include "syscall.h"
#include "system/syscall.h"
#include "sys/module.h"
#include "system/panic.h"
#include "vfs.h"
#include "errno.h"
#include "debug.h"
#include "kheap.h"
#include "fs/vfs.h"
#include "sys/errno.h"
#include "misc/debug.h"
#include "mem/kheap.h"
#include "fcntl.h"
#include "sys/bitops.h"
#include "initrd.h"
#include "fs/initrd.h"
#include "string.h"
#include "stdio.h"
#include "libgen.h"
+5 -5
View File
@@ -4,12 +4,12 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "ioctl.h"
#include "scheduler.h"
#include "printk.h"
#include "fs/ioctl.h"
#include "process/scheduler.h"
#include "system/printk.h"
#include "stdio.h"
#include "errno.h"
#include "vfs.h"
#include "sys/errno.h"
#include "fs/vfs.h"
int sys_ioctl(int fd, int request, void *data)
{
+3 -3
View File
@@ -4,9 +4,9 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "errno.h"
#include "vfs.h"
#include "scheduler.h"
#include "sys/errno.h"
#include "fs/vfs.h"
#include "process/scheduler.h"
int sys_unlink(const char *path)
{
+4 -4
View File
@@ -8,13 +8,13 @@
#include "process/process.h"
#include "system/printk.h"
#include "fcntl.h"
#include "syscall.h"
#include "system/syscall.h"
#include "string.h"
#include "limits.h"
#include "debug.h"
#include "errno.h"
#include "misc/debug.h"
#include "sys/errno.h"
#include "stdio.h"
#include "vfs.h"
#include "fs/vfs.h"
int sys_open(const char *pathname, int flags, mode_t mode)
{
+4 -4
View File
@@ -7,11 +7,11 @@
/// Change the header.
#define __DEBUG_HEADER__ "[PROCFS]"
#include "procfs.h"
#include "vfs.h"
#include "fs/procfs.h"
#include "fs/vfs.h"
#include "string.h"
#include "errno.h"
#include "debug.h"
#include "sys/errno.h"
#include "misc/debug.h"
#include "fcntl.h"
#include "libgen.h"
#include "assert.h"
+5 -5
View File
@@ -4,13 +4,13 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "scheduler.h"
#include "vfs_types.h"
#include "panic.h"
#include "errno.h"
#include "process/scheduler.h"
#include "fs/vfs_types.h"
#include "system/panic.h"
#include "sys/errno.h"
#include "fcntl.h"
#include "stdio.h"
#include "vfs.h"
#include "fs/vfs.h"
ssize_t sys_read(int fd, void *buf, size_t nbytes)
{
+5 -5
View File
@@ -5,12 +5,12 @@
/// See LICENSE.md for details.
#include "sys/dirent.h"
#include "scheduler.h"
#include "syscall.h"
#include "printk.h"
#include "errno.h"
#include "process/scheduler.h"
#include "system/syscall.h"
#include "system/printk.h"
#include "sys/errno.h"
#include "stdio.h"
#include "vfs.h"
#include "fs/vfs.h"
int sys_getdents(int fd, dirent_t *dirp, unsigned int count)
{
+5 -5
View File
@@ -4,13 +4,13 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "debug.h"
#include "errno.h"
#include "vfs.h"
#include "kheap.h"
#include "misc/debug.h"
#include "sys/errno.h"
#include "fs/vfs.h"
#include "mem/kheap.h"
#include "stdio.h"
#include "string.h"
#include "initrd.h"
#include "fs/initrd.h"
#include "limits.h"
int sys_stat(const char *path, stat_t *buf)
+8 -8
View File
@@ -4,19 +4,19 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "vfs.h"
#include "fs/vfs.h"
#include "scheduler.h"
#include "spinlock.h"
#include "process/scheduler.h"
#include "klib/spinlock.h"
#include "strerror.h"
#include "syscall.h"
#include "hashmap.h"
#include "system/syscall.h"
#include "klib/hashmap.h"
#include "string.h"
#include "procfs.h"
#include "fs/procfs.h"
#include "assert.h"
#include "libgen.h"
#include "debug.h"
#include "panic.h"
#include "misc/debug.h"
#include "system/panic.h"
#include "stdio.h"
/// The hashmap that associates a type of Filesystem `name` to its `mount` function;
+1 -1
View File
@@ -4,7 +4,7 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "cpuid.h"
#include "hardware/cpuid.h"
#include "string.h"
void get_cpuid(cpuinfo_t *cpuinfo)
+2 -2
View File
@@ -4,8 +4,8 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "pic8259.h"
#include "port_io.h"
#include "hardware/pic8259.h"
#include "io/port_io.h"
#include "stddef.h"
/// End-of-interrupt command code.
+13 -13
View File
@@ -4,22 +4,22 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "timer.h"
#include "hardware/timer.h"
#include "irqflags.h"
#include "scheduler.h"
#include "pic8259.h"
#include "port_io.h"
#include "klib/irqflags.h"
#include "process/scheduler.h"
#include "hardware/pic8259.h"
#include "io/port_io.h"
#include "stdint.h"
#include "kheap.h"
#include "debug.h"
#include "wait.h"
#include "rtc.h"
#include "isr.h"
#include "fpu.h"
#include "signal.h"
#include "mem/kheap.h"
#include "misc/debug.h"
#include "process/wait.h"
#include "drivers/rtc.h"
#include "descriptor_tables/isr.h"
#include "devices/fpu.h"
#include "system/signal.h"
#include "assert.h"
#include "errno.h"
#include "sys/errno.h"
/// Number of ticks per seconds.
#define TICKS_PER_SECOND 1193
+1 -1
View File
@@ -4,7 +4,7 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "mm_io.h"
#include "io/mm_io.h"
uint8_t in_memb(uint32_t addr)
{
+1 -1
View File
@@ -4,7 +4,7 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "port_io.h"
#include "io/port_io.h"
inline uint8_t inportb(uint16_t port)
{
+5 -5
View File
@@ -2,15 +2,15 @@
// Created by andrea on 02/05/20.
//
#include "procfs.h"
#include "fs/procfs.h"
#include "process.h"
#include "process/process.h"
#include "string.h"
#include "libgen.h"
#include "stdio.h"
#include "errno.h"
#include "debug.h"
#include "prio.h"
#include "sys/errno.h"
#include "misc/debug.h"
#include "process/prio.h"
/// @brief Returns the character identifying the process state.
/// @details
+5 -5
View File
@@ -4,14 +4,14 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "procfs.h"
#include "fs/procfs.h"
#include "version.h"
#include "process.h"
#include "process/process.h"
#include "string.h"
#include "stdio.h"
#include "errno.h"
#include "debug.h"
#include "timer.h"
#include "sys/errno.h"
#include "misc/debug.h"
#include "hardware/timer.h"
static ssize_t procs_do_uptime(char *buffer, size_t bufsize);
+8 -8
View File
@@ -2,16 +2,16 @@
// Created by andrea on 02/05/20.
//
#include "termios-struct.h"
#include "keyboard.h"
#include "procfs.h"
#include "ioctls.h"
#include "bits/termios-struct.h"
#include "drivers/keyboard/keyboard.h"
#include "fs/procfs.h"
#include "bits/ioctls.h"
#include "sys/bitops.h"
#include "video.h"
#include "debug.h"
#include "errno.h"
#include "io/video.h"
#include "misc/debug.h"
#include "sys/errno.h"
#include "fcntl.h"
#include "vfs.h"
#include "fs/vfs.h"
static termios ktermios = {
.c_cflag = 0,
+4 -4
View File
@@ -2,12 +2,12 @@
/// @brief Standard I/0 functions.
/// @date Apr 2019
#include "syscall.h"
#include "errno.h"
#include "system/syscall.h"
#include "sys/errno.h"
#include "stdio.h"
#include "video.h"
#include "io/video.h"
#include "ctype.h"
#include "keyboard.h"
#include "drivers/keyboard/keyboard.h"
#include "string.h"
void putchar(int character)
+6 -6
View File
@@ -1,13 +1,13 @@
#include "vga.h"
#include "io/vga/vga.h"
#include "vga_palette.h"
#include "vga_mode.h"
#include "vga_font.h"
#include "io/vga/vga_palette.h"
#include "io/vga/vga_mode.h"
#include "io/vga/vga_font.h"
#include "port_io.h"
#include "io/port_io.h"
#include "stdbool.h"
#include "string.h"
#include "debug.h"
#include "misc/debug.h"
#include "math.h"
#define COUNT_OF(x) ((sizeof(x) / sizeof(0 [x])) / ((size_t)(!(sizeof(x) % sizeof(0 [x])))))
+2 -2
View File
@@ -4,8 +4,8 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "port_io.h"
#include "video.h"
#include "io/port_io.h"
#include "io/video.h"
#include "stdbool.h"
#include "ctype.h"
#include "string.h"
+1 -1
View File
@@ -6,7 +6,7 @@
///! @cond Doxygen_Suppress
#include "ipc/msg.h"
#include "panic.h"
#include "system/panic.h"
long sys_msgget(key_t key, int msgflg)
{
+1 -1
View File
@@ -6,7 +6,7 @@
///! @cond Doxygen_Suppress
#include "ipc/sem.h"
#include "panic.h"
#include "system/panic.h"
long sys_semget(key_t key, int nsems, int semflg)
{
+1 -1
View File
@@ -6,7 +6,7 @@
///! @cond Doxygen_Suppress
#include "ipc/shm.h"
#include "panic.h"
#include "system/panic.h"
#if 0
struct shmid_ds *head = NULL;
+24 -24
View File
@@ -4,34 +4,34 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "proc_modules.h"
#include "vmem_map.h"
#include "procfs.h"
#include "pci.h"
#include "ata.h"
#include "idt.h"
#include "io/proc_modules.h"
#include "mem/vmem_map.h"
#include "fs/procfs.h"
#include "devices/pci.h"
#include "drivers/ata.h"
#include "descriptor_tables/idt.h"
#include "kernel.h"
#include "zone_allocator.h"
#include "gdt.h"
#include "syscall.h"
#include "mem/zone_allocator.h"
#include "descriptor_tables/gdt.h"
#include "system/syscall.h"
#include "version.h"
#include "video.h"
#include "pic8259.h"
#include "debug.h"
#include "fdc.h"
#include "initrd.h"
#include "irqflags.h"
#include "keyboard.h"
#include "scheduler.h"
#include "timer.h"
#include "vfs.h"
#include "fpu.h"
#include "printk.h"
#include "module.h"
#include "rtc.h"
#include "io/video.h"
#include "hardware/pic8259.h"
#include "misc/debug.h"
#include "drivers/fdc.h"
#include "fs/initrd.h"
#include "klib/irqflags.h"
#include "drivers/keyboard/keyboard.h"
#include "process/scheduler.h"
#include "hardware/timer.h"
#include "fs/vfs.h"
#include "devices/fpu.h"
#include "system/printk.h"
#include "sys/module.h"
#include "drivers/rtc.h"
#include "stdio.h"
#include "assert.h"
#include "vga.h"
#include "io/vga/vga.h"
/// Describe start address of grub multiboot modules.
char *module_start[MAX_MODULES];
+4 -4
View File
@@ -5,10 +5,10 @@
/// See LICENSE.md for details.
#include "stdio.h"
#include "errno.h"
#include "reboot.h"
#include "stdatomic.h"
#include "mutex.h"
#include "sys/errno.h"
#include "sys/reboot.h"
#include "klib/stdatomic.h"
#include "klib/mutex.h"
static void machine_power_off()
{
+1 -1
View File
@@ -6,7 +6,7 @@
#include "assert.h"
#include "stdio.h"
#include "panic.h"
#include "system/panic.h"
void __assert_fail(const char *assertion, const char *file, const char *function, unsigned int line)
{
+2 -2
View File
@@ -4,10 +4,10 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "hashmap.h"
#include "klib/hashmap.h"
#include "assert.h"
#include "string.h"
#include "slab.h"
#include "mem/slab.h"
/// @brief Stores information of an entry of the hashmap.
struct hashmap_entry_t {
+3 -3
View File
@@ -4,13 +4,13 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "syscall.h"
#include "system/syscall.h"
#include "libgen.h"
#include "string.h"
#include "initrd.h"
#include "fs/initrd.h"
#include "limits.h"
#include "assert.h"
#include "paging.h"
#include "mem/paging.h"
int parse_path(char *out, char **cur, char sep, size_t max)
{
+2 -2
View File
@@ -4,10 +4,10 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "list.h"
#include "klib/list.h"
#include "assert.h"
#include "string.h"
#include "slab.h"
#include "mem/slab.h"
static inline listnode_t *__node_alloc()
{
+2 -2
View File
@@ -4,8 +4,8 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "mutex.h"
#include "debug.h"
#include "klib/mutex.h"
#include "misc/debug.h"
void mutex_lock(mutex_t *mutex, uint32_t owner)
{
+4 -4
View File
@@ -4,11 +4,11 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "debug.h"
#include "ndtree.h"
#include "misc/debug.h"
#include "klib/ndtree.h"
#include "assert.h"
#include "list_head.h"
#include "slab.h"
#include "klib/list_head.h"
#include "mem/slab.h"
// ============================================================================
// Tree types.
+3 -3
View File
@@ -4,11 +4,11 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "rbtree.h"
#include "klib/rbtree.h"
#include "assert.h"
#include "debug.h"
#include "slab.h"
#include "misc/debug.h"
#include "mem/slab.h"
/// @brief Stores information of a node.
struct rbtree_node_t {
+1 -1
View File
@@ -4,7 +4,7 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "spinlock.h"
#include "klib/spinlock.h"
void spinlock_init(spinlock_t *spinlock)
{
+1 -1
View File
@@ -4,7 +4,7 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "kheap.h"
#include "mem/kheap.h"
#include "stdio.h"
#include "fcntl.h"
#include "string.h"
+4 -4
View File
@@ -4,13 +4,13 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "debug.h"
#include "misc/debug.h"
#include "time.h"
#include "stdio.h"
#include "stddef.h"
#include "port_io.h"
#include "timer.h"
#include "rtc.h"
#include "io/port_io.h"
#include "hardware/timer.h"
#include "drivers/rtc.h"
static const char *str_weekdays[] = { "Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday" };
+2 -2
View File
@@ -4,10 +4,10 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "vfs.h"
#include "fs/vfs.h"
#include "ctype.h"
#include "string.h"
#include "debug.h"
#include "misc/debug.h"
#include "stdio.h"
static int vsscanf(const char *buf, const char *s, va_list ap)
+1 -1
View File
@@ -11,7 +11,7 @@
#include "stdbool.h"
#include "stdint.h"
#include "stdio.h"
#include "video.h"
#include "io/video.h"
#include "fcvt.h"
/// Size of the buffer used to call cvt functions.
+4 -4
View File
@@ -7,11 +7,11 @@
/// Change the header.
#define __DEBUG_HEADER__ "[BUDDY ]"
#include "buddysystem.h"
#include "paging.h"
#include "mem/buddysystem.h"
#include "mem/paging.h"
#include "assert.h"
#include "debug.h"
#include "panic.h"
#include "misc/debug.h"
#include "system/panic.h"
/// @brief Cache level low limit after which allocation starts.
#define LOW_WATERMARK_LEVEL 10
+4 -4
View File
@@ -7,13 +7,13 @@
/// Change the header.
#define __DEBUG_HEADER__ "[KHEAP ]"
#include "kheap.h"
#include "mem/kheap.h"
#include "math.h"
#include "debug.h"
#include "misc/debug.h"
#include "string.h"
#include "paging.h"
#include "mem/paging.h"
#include "assert.h"
#include "list_head.h"
#include "klib/list_head.h"
/// Overhead given by the block_t itself.
#define OVERHEAD sizeof(block_t)
+7 -7
View File
@@ -7,15 +7,15 @@
/// Change the header.
#define __DEBUG_HEADER__ "[PAGING]"
#include "paging.h"
#include "isr.h"
#include "vmem_map.h"
#include "zone_allocator.h"
#include "kheap.h"
#include "debug.h"
#include "mem/paging.h"
#include "descriptor_tables/isr.h"
#include "mem/vmem_map.h"
#include "mem/zone_allocator.h"
#include "mem/kheap.h"
#include "misc/debug.h"
#include "assert.h"
#include "string.h"
#include "panic.h"
#include "system/panic.h"
/// Cache for storing mm_struct.
kmem_cache_t *mm_cache;
+4 -4
View File
@@ -7,11 +7,11 @@
/// Change the header.
#define __DEBUG_HEADER__ "[SLAB ]"
#include "zone_allocator.h"
#include "paging.h"
#include "mem/zone_allocator.h"
#include "mem/paging.h"
#include "assert.h"
#include "debug.h"
#include "slab.h"
#include "misc/debug.h"
#include "mem/slab.h"
/// @brief Use it to manage cached pages.
typedef struct kmem_obj {
+2 -2
View File
@@ -7,9 +7,9 @@
/// Change the header.
#define __DEBUG_HEADER__ "[VMEM ]"
#include "vmem_map.h"
#include "mem/vmem_map.h"
#include "string.h"
#include "panic.h"
#include "system/panic.h"
/// Virtual addresses manager.
static virt_map_page_manager_t virt_default_mapping;
+5 -5
View File
@@ -7,14 +7,14 @@
/// Change the header.
#define __DEBUG_HEADER__ "[PMM ]"
#include "zone_allocator.h"
#include "buddysystem.h"
#include "list_head.h"
#include "mem/zone_allocator.h"
#include "mem/buddysystem.h"
#include "klib/list_head.h"
#include "kernel.h"
#include "assert.h"
#include "paging.h"
#include "mem/paging.h"
#include "string.h"
#include "debug.h"
#include "misc/debug.h"
/// TODO: Comment.
#define MIN_PAGE_ALIGN(addr) ((addr) & (~(PAGE_SIZE - 1)))
+4 -4
View File
@@ -5,13 +5,13 @@
/// See LICENSE.md for details.
#include "sys/bitops.h"
#include "debug.h"
#include "spinlock.h"
#include "port_io.h"
#include "misc/debug.h"
#include "klib/spinlock.h"
#include "io/port_io.h"
#include "kernel.h"
#include "string.h"
#include "stdio.h"
#include "video.h"
#include "io/video.h"
/// Serial port for QEMU.
#define SERIAL_COM1 (0x03F8)
+2 -2
View File
@@ -10,8 +10,8 @@
#include "kernel.h"
#include "sys/bitops.h"
#include "stddef.h"
#include "debug.h"
#include "panic.h"
#include "misc/debug.h"
#include "system/panic.h"
#include "stddef.h"
+11 -11
View File
@@ -5,26 +5,26 @@
/// See LICENSE.md for details.
#include "kernel_levels.h"
#include "sys/kernel_levels.h"
//#ifndef __DEBUG_LEVEL__
//#define __DEBUG_LEVEL__ LOGLEVEL_DEBUG
//#endif
#include <errno.h>
#include "process.h"
#include "scheduler.h"
#include "process/process.h"
#include "process/scheduler.h"
#include "assert.h"
#include "libgen.h"
#include "string.h"
#include "timer.h"
#include "hardware/timer.h"
#include "sys/errno.h"
#include "fcntl.h"
#include "panic.h"
#include "debug.h"
#include "wait.h"
#include "prio.h"
#include "vfs.h"
#include "elf.h"
#include "system/panic.h"
#include "misc/debug.h"
#include "process/wait.h"
#include "process/prio.h"
#include "fs/vfs.h"
#include "elf/elf.h"
/// Cache for creating the task structs.
static kmem_cache_t *task_struct_cache;
+13 -13
View File
@@ -9,20 +9,20 @@
#include "assert.h"
#include "strerror.h"
#include "vfs.h"
#include "scheduler.h"
#include "tss.h"
#include "fpu.h"
#include "prio.h"
#include "wait.h"
#include "kheap.h"
#include "panic.h"
#include "debug.h"
#include "fs/vfs.h"
#include "process/scheduler.h"
#include "descriptor_tables/tss.h"
#include "devices/fpu.h"
#include "process/prio.h"
#include "process/wait.h"
#include "mem/kheap.h"
#include "system/panic.h"
#include "misc/debug.h"
#include "time.h"
#include "errno.h"
#include "list_head.h"
#include "paging.h"
#include "timer.h"
#include "sys/errno.h"
#include "klib/list_head.h"
#include "mem/paging.h"
#include "hardware/timer.h"
#include "math.h"
#include "stdio.h"
+6 -6
View File
@@ -4,13 +4,13 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "timer.h"
#include "prio.h"
#include "debug.h"
#include "hardware/timer.h"
#include "process/prio.h"
#include "misc/debug.h"
#include "assert.h"
#include "list_head.h"
#include "wait.h"
#include "scheduler.h"
#include "klib/list_head.h"
#include "process/wait.h"
#include "process/scheduler.h"
/// @brief Updates task execution statistics.
/// @param task the task to update.
+1 -1
View File
@@ -7,7 +7,7 @@
/// Change the header.
#define __DEBUG_HEADER__ "[WAIT ]"
#include "wait.h"
#include "process/wait.h"
static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_entry_t *wq)
{
+3 -3
View File
@@ -4,11 +4,11 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "slab.h"
#include "module.h"
#include "mem/slab.h"
#include "sys/module.h"
#include "string.h"
#include "sys/bitops.h"
#include "debug.h"
#include "misc/debug.h"
/// Defined in kernel.ld, points at the end of kernel's data segment.
extern void *_kernel_end;
+4 -4
View File
@@ -5,12 +5,12 @@
/// See LICENSE.md for details.
#include "string.h"
#include "utsname.h"
#include "sys/utsname.h"
#include "version.h"
#include "debug.h"
#include "errno.h"
#include "misc/debug.h"
#include "sys/errno.h"
#include "fcntl.h"
#include "vfs.h"
#include "fs/vfs.h"
static inline int __gethostname(char *name, size_t len)
{
+2 -2
View File
@@ -4,8 +4,8 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "errno.h"
#include "scheduler.h"
#include "sys/errno.h"
#include "process/scheduler.h"
/// @brief Returns the error number for the current process.
/// @return Pointer to the error number.
+2 -2
View File
@@ -4,8 +4,8 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "panic.h"
#include "debug.h"
#include "system/panic.h"
#include "misc/debug.h"
void kernel_panic(const char *msg)
{
+2 -2
View File
@@ -4,10 +4,10 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "printk.h"
#include "system/printk.h"
#include "stdarg.h"
#include "stdio.h"
#include "video.h"
#include "io/video.h"
int sys_syslog(const char *format, ...)
{
+7 -7
View File
@@ -7,15 +7,15 @@
/// Change the header.
#define __DEBUG_HEADER__ "[SIGNAL]"
#include "signal.h"
#include "wait.h"
#include "scheduler.h"
#include "process.h"
#include "errno.h"
#include "system/signal.h"
#include "process/wait.h"
#include "process/scheduler.h"
#include "process/process.h"
#include "sys/errno.h"
#include "assert.h"
#include "debug.h"
#include "misc/debug.h"
#include "string.h"
#include "irqflags.h"
#include "klib/irqflags.h"
/// SLAB caches for signal bits.
static kmem_cache_t *sigqueue_cachep;
+10 -10
View File
@@ -4,17 +4,17 @@
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "fpu.h"
#include "kheap.h"
#include "syscall.h"
#include "isr.h"
#include "errno.h"
#include "devices/fpu.h"
#include "mem/kheap.h"
#include "system/syscall.h"
#include "descriptor_tables/isr.h"
#include "sys/errno.h"
#include "kernel.h"
#include "process.h"
#include "scheduler.h"
#include "utsname.h"
#include "ioctl.h"
#include "timer.h"
#include "process/process.h"
#include "process/scheduler.h"
#include "sys/utsname.h"
#include "fs/ioctl.h"
#include "hardware/timer.h"
#include "ipc/msg.h"
#include "ipc/sem.h"