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
+1 -26
View File
@@ -134,32 +134,7 @@ endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
# =============================================================================
# Add the includes.
include_directories(
inc
inc/bits
inc/descriptor_tables
inc/devices
inc/drivers
inc/drivers/keyboard
inc/fs
inc/hardware
inc/io
inc/io/vga
inc/ipc
inc/kernel
inc/klib
inc/lng
inc/mem
inc/misc
inc/sys
inc/system
inc/process
inc/elf
inc/ui
inc/ui/shell
inc/ui/command
inc/ui/init
../libc/inc)
include_directories(inc ../libc/inc)
# =============================================================================
# Add kernel library.
-9
View File
@@ -1,9 +0,0 @@
/// MentOS, The Mentoring Operating system project
/// @file ioctls.h
/// @brief Definitions of tty ioctl numbers. 0x54 is just a magic number to make these
/// relatively unique ('T')
#pragma once
#define TCGETS 0x5401U ///< Get the current serial port settings.
#define TCSETS 0x5402U ///< Set the current serial port settings.
-45
View File
@@ -1,45 +0,0 @@
/// MentOS, The Mentoring Operating system project
/// @file termios-struct.h
/// @brief
/// Copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
/// Type for control characters.
typedef unsigned char cc_t;
/// Type for speed.
typedef unsigned int speed_t;
/// Type for flags.
typedef unsigned int tcflag_t;
/// The number of control characters.
#define NCCS 32
/// @brief Stores information about a terminal IOs.
typedef struct termios {
tcflag_t c_iflag; ///< input mode flags
tcflag_t c_oflag; ///< output mode flags
tcflag_t c_cflag; ///< control mode flags
tcflag_t c_lflag; ///< local mode flags
cc_t c_line; ///< line discipline
cc_t c_cc[NCCS]; ///< control characters
speed_t c_ispeed; ///< input speed
speed_t c_ospeed; ///< output speed
} termios;
/// @brief These flags generally control higher-level aspects of input processing than the input
/// modes flags described in Input Modes, such as echoing, signals, and the choice of canonical
/// or noncanonical input.
enum {
ISIG = 000001U, ///< Controls whether the INTR, QUIT, and SUSP characters are recognized.
ICANON = 000002U, ///< Enables canonical input processing mode.
ECHO = 000010U, ///< Echo input characters.
ECHOE = 000020U, ///< If ICANON is set, the ERASE character erases the preceding character.
ECHOK = 000040U, ///< If ICANON is set, the KILL character erases the current line.
ECHONL = 000100U, ///< If ICANON is set, echo the NL character even if ECHO is not set.
NOFLSH = 000200U, ///< Do not clear in/out queues when receiving INTR, QUIT, and SUSP.
TOSTOP = 000400U, ///< Allows SIGTTOU signals generated by background processes.
ECHOCTL = 001000U, ///< If this and ECHO are set, control characters with ^ are echoed.
ECHOKE = 004000U, ///< If ICANON is set, KILL is echoed by erasing each character on the line.
IEXTEN = 100000U, ///< Enables implementation-defined input processing.
};
+1 -1
View File
@@ -6,7 +6,7 @@
#pragma once
#include "process.h"
#include "process/process.h"
#include "stdint.h"
/// @defgroup header_segment_types Program Header Segment Types
+1 -1
View File
@@ -6,7 +6,7 @@
#pragma once
#include "process.h"
#include "process/process.h"
/// @brief Stores information about a procfs directory entry.
typedef struct proc_dir_entry_t {
+2 -2
View File
@@ -6,8 +6,8 @@
#pragma once
#include "vfs_types.h"
#include "slab.h"
#include "fs/vfs_types.h"
#include "mem/slab.h"
#define MAX_OPEN_FD 16 ///< Maximum number of opened file.
+1 -1
View File
@@ -6,7 +6,7 @@
#pragma once
#include "list_head.h"
#include "klib/list_head.h"
#include "sys/dirent.h"
#include "bits/stat.h"
#include "stdint.h"
+3 -3
View File
@@ -8,9 +8,9 @@
#include "kernel.h"
#include "stdint.h"
#include "list_head.h"
#include "spinlock.h"
#include "process.h"
#include "klib/list_head.h"
#include "klib/spinlock.h"
#include "process/process.h"
#include "time.h"
/// This enables the dynamic timer system use an hierarchical timing wheel,
+1 -1
View File
@@ -6,7 +6,7 @@
#pragma once
#include "vfs.h"
#include "fs/vfs.h"
/// @brief Initialize the procfs video files.
/// @return 0 on success, 1 on failure.
+1 -1
View File
@@ -6,7 +6,7 @@
#pragma once
#include "list.h"
#include "klib/list.h"
// == OPAQUE TYPES ============================================================
/// @brief Stores information of an entry of the hashmap.
+1 -1
View File
@@ -6,7 +6,7 @@
#pragma once
#include "stdatomic.h"
#include "klib/stdatomic.h"
/// Determines if the spinlock is free.
#define SPINLOCK_FREE 0
+1 -1
View File
@@ -8,7 +8,7 @@
#include "stdint.h"
#include "stdbool.h"
#include "compiler.h"
#include "klib/compiler.h"
/// @brief Standard structure for atomic operations (see below
/// for volatile explanation).
+1 -1
View File
@@ -8,7 +8,7 @@
#pragma once
#include "kernel.h"
#include "scheduler.h"
#include "process/scheduler.h"
/// @brief Initialize heap.
/// @param initial_size Starting size.
+1 -1
View File
@@ -6,7 +6,7 @@
#pragma once
#include "zone_allocator.h"
#include "mem/zone_allocator.h"
#include "proc_access.h"
#include "kernel.h"
#include "stddef.h"
+2 -2
View File
@@ -6,9 +6,9 @@
#pragma once
#include "list_head.h"
#include "klib/list_head.h"
#include "stddef.h"
#include "gfp.h"
#include "mem/gfp.h"
//#define ENABLE_CACHE_TRACE
//#define ENABLE_ALLOC_TRACE
+3 -3
View File
@@ -6,9 +6,9 @@
#pragma once
#include "buddysystem.h"
#include "zone_allocator.h"
#include "paging.h"
#include "mem/buddysystem.h"
#include "mem/zone_allocator.h"
#include "mem/paging.h"
/// Size of the virtual memory.
#define VIRTUAL_MEMORY_SIZE_MB 128
+5 -5
View File
@@ -6,15 +6,15 @@
#pragma once
#include "gfp.h"
#include "mem/gfp.h"
#include "math.h"
#include "stdint.h"
#include "list_head.h"
#include "klib/list_head.h"
#include "sys/bitops.h"
#include "stdatomic.h"
#include "klib/stdatomic.h"
#include "boot.h"
#include "buddysystem.h"
#include "slab.h"
#include "mem/buddysystem.h"
#include "mem/slab.h"
#define page_count(p) atomic_read(&(p)->count) ///< Reads the page count.
#define set_page_count(p, v) atomic_set(&(p)->count, v) ///< Sets the page count.
+1 -1
View File
@@ -6,7 +6,7 @@
#pragma once
#include "kernel_levels.h"
#include "sys/kernel_levels.h"
struct pt_regs;
+3 -3
View File
@@ -6,9 +6,9 @@
#pragma once
#include "paging.h"
#include "signal.h"
#include "fpu.h"
#include "mem/paging.h"
#include "system/signal.h"
#include "devices/fpu.h"
/// The maximum length of a name for a task_struct.
#define TASK_NAME_MAX_LENGTH 100
+2 -2
View File
@@ -6,8 +6,8 @@
#pragma once
#include "list_head.h"
#include "process.h"
#include "klib/list_head.h"
#include "process/process.h"
#include "stddef.h"
/// @brief Structure that contains information about live processes.
+2 -2
View File
@@ -6,8 +6,8 @@
#pragma once
#include "list_head.h"
#include "spinlock.h"
#include "klib/list_head.h"
#include "klib/spinlock.h"
/// @brief Return immediately if no child is there to be waited for.
#define WNOHANG 0x00000001
+4 -4
View File
@@ -6,10 +6,10 @@
#pragma once
#include "stdatomic.h"
#include "spinlock.h"
#include "list_head.h"
#include "syscall.h"
#include "klib/stdatomic.h"
#include "klib/spinlock.h"
#include "klib/list_head.h"
#include "system/syscall.h"
/// @brief Signal codes.
typedef enum {
+3 -3
View File
@@ -6,11 +6,11 @@
#pragma once
#include "syscall_types.h"
#include "vfs_types.h"
#include "system/syscall_types.h"
#include "fs/vfs_types.h"
#include "kernel.h"
#include "sys/dirent.h"
#include "types.h"
#include "sys/types.h"
/// @brief Initialize the system calls.
void syscall_init();
-197
View File
@@ -1,197 +0,0 @@
/// MentOS, The Mentoring Operating system project
/// @file syscall_types.h
/// @brief System Call numbers.
/// @copyright (c) 2014-2021 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
#define __NR_exit 1 ///< System-call number for `exit`
#define __NR_fork 2 ///< System-call number for `fork`
#define __NR_read 3 ///< System-call number for `read`
#define __NR_write 4 ///< System-call number for `write`
#define __NR_open 5 ///< System-call number for `open`
#define __NR_close 6 ///< System-call number for `close`
#define __NR_waitpid 7 ///< System-call number for `waitpid`
#define __NR_creat 8 ///< System-call number for `creat`
#define __NR_link 9 ///< System-call number for `link`
#define __NR_unlink 10 ///< System-call number for `unlink`
#define __NR_execve 11 ///< System-call number for `execve`
#define __NR_chdir 12 ///< System-call number for `chdir`
#define __NR_time 13 ///< System-call number for `time`
#define __NR_mknod 14 ///< System-call number for `mknod`
#define __NR_chmod 15 ///< System-call number for `chmod`
#define __NR_lchown 16 ///< System-call number for `lchown`
#define __NR_stat 18 ///< System-call number for `stat`
#define __NR_lseek 19 ///< System-call number for `lseek`
#define __NR_getpid 20 ///< System-call number for `getpid`
#define __NR_mount 21 ///< System-call number for `mount`
#define __NR_oldumount 22 ///< System-call number for `oldumount`
#define __NR_setuid 23 ///< System-call number for `setuid`
#define __NR_getuid 24 ///< System-call number for `getuid`
#define __NR_stime 25 ///< System-call number for `stime`
#define __NR_ptrace 26 ///< System-call number for `ptrace`
#define __NR_alarm 27 ///< System-call number for `alarm`
#define __NR_fstat 28 ///< System-call number for `fstat`
#define __NR_pause 29 ///< System-call number for `pause`
#define __NR_utime 30 ///< System-call number for `utime`
#define __NR_access 33 ///< System-call number for `access`
#define __NR_nice 34 ///< System-call number for `nice`
#define __NR_sync 36 ///< System-call number for `sync`
#define __NR_kill 37 ///< System-call number for `kill`
#define __NR_rename 38 ///< System-call number for `rename`
#define __NR_mkdir 39 ///< System-call number for `mkdir`
#define __NR_rmdir 40 ///< System-call number for `rmdir`
#define __NR_dup 41 ///< System-call number for `dup`
#define __NR_pipe 42 ///< System-call number for `pipe`
#define __NR_times 43 ///< System-call number for `times`
#define __NR_brk 45 ///< System-call number for `brk`
#define __NR_setgid 46 ///< System-call number for `setgid`
#define __NR_getgid 47 ///< System-call number for `getgid`
#define __NR_signal 48 ///< System-call number for `signal`
#define __NR_geteuid 49 ///< System-call number for `geteuid`
#define __NR_getegid 50 ///< System-call number for `getegid`
#define __NR_acct 51 ///< System-call number for `acct`
#define __NR_umount 52 ///< System-call number for `umount`
#define __NR_ioctl 54 ///< System-call number for `ioctl`
#define __NR_fcntl 55 ///< System-call number for `fcntl`
#define __NR_setpgid 57 ///< System-call number for `setpgid`
#define __NR_olduname 59 ///< System-call number for `olduname`
#define __NR_umask 60 ///< System-call number for `umask`
#define __NR_chroot 61 ///< System-call number for `chroot`
#define __NR_ustat 62 ///< System-call number for `ustat`
#define __NR_dup2 63 ///< System-call number for `dup2`
#define __NR_getppid 64 ///< System-call number for `getppid`
#define __NR_getpgrp 65 ///< System-call number for `getpgrp`
#define __NR_setsid 66 ///< System-call number for `setsid`
#define __NR_sigaction 67 ///< System-call number for `sigaction`
#define __NR_sgetmask 68 ///< System-call number for `sgetmask`
#define __NR_ssetmask 69 ///< System-call number for `ssetmask`
#define __NR_setreuid 70 ///< System-call number for `setreuid`
#define __NR_setregid 71 ///< System-call number for `setregid`
#define __NR_sigsuspend 72 ///< System-call number for `sigsuspend`
#define __NR_sigpending 73 ///< System-call number for `sigpending`
#define __NR_sethostname 74 ///< System-call number for `sethostname`
#define __NR_setrlimit 75 ///< System-call number for `setrlimit`
#define __NR_getrlimit 76 ///< System-call number for `getrlimit`
#define __NR_getrusage 77 ///< System-call number for `getrusage`
#define __NR_gettimeofday 78 ///< System-call number for `gettimeofday`
#define __NR_settimeofday 79 ///< System-call number for `settimeofday`
#define __NR_getgroups 80 ///< System-call number for `getgroups`
#define __NR_setgroups 81 ///< System-call number for `setgroups`
#define __NR_symlink 83 ///< System-call number for `symlink`
#define __NR_lstat 84 ///< System-call number for `lstat`
#define __NR_readlink 85 ///< System-call number for `readlink`
#define __NR_uselib 86 ///< System-call number for `uselib`
#define __NR_swapon 87 ///< System-call number for `swapon`
#define __NR_reboot 88 ///< System-call number for `reboot`
#define __NR_readdir 89 ///< System-call number for `readdir`
#define __NR_mmap 90 ///< System-call number for `mmap`
#define __NR_munmap 91 ///< System-call number for `munmap`
#define __NR_truncate 92 ///< System-call number for `truncate`
#define __NR_ftruncate 93 ///< System-call number for `ftruncate`
#define __NR_fchmod 94 ///< System-call number for `fchmod`
#define __NR_fchown 95 ///< System-call number for `fchown`
#define __NR_getpriority 96 ///< System-call number for `getpriority`
#define __NR_setpriority 97 ///< System-call number for `setpriority`
#define __NR_statfs 99 ///< System-call number for `statfs`
#define __NR_fstatfs 100 ///< System-call number for `fstatfs`
#define __NR_ioperm 101 ///< System-call number for `ioperm`
#define __NR_socketcall 102 ///< System-call number for `socketcall`
#define __NR_syslog 103 ///< System-call number for `syslog`
#define __NR_setitimer 104 ///< System-call number for `setitimer`
#define __NR_getitimer 105 ///< System-call number for `getitimer`
#define __NR_newstat 106 ///< System-call number for `newstat`
#define __NR_newlstat 107 ///< System-call number for `newlstat`
#define __NR_newfstat 108 ///< System-call number for `newfstat`
#define __NR_uname 109 ///< System-call number for `uname`
#define __NR_iopl 110 ///< System-call number for `iopl`
#define __NR_vhangup 111 ///< System-call number for `vhangup`
#define __NR_idle 112 ///< System-call number for `idle`
#define __NR_vm86old 113 ///< System-call number for `vm86old`
#define __NR_wait4 114 ///< System-call number for `wait4`
#define __NR_swapoff 115 ///< System-call number for `swapoff`
#define __NR_sysinfo 116 ///< System-call number for `sysinfo`
#define __NR_ipc 117 ///< System-call number for `ipc`
#define __NR_fsync 118 ///< System-call number for `fsync`
#define __NR_sigreturn 119 ///< System-call number for `sigreturn`
#define __NR_clone 120 ///< System-call number for `clone`
#define __NR_setdomainname 121 ///< System-call number for `setdomainname`
#define __NR_newuname 122 ///< System-call number for `newuname`
#define __NR_modify_ldt 123 ///< System-call number for `modify_ldt`
#define __NR_adjtimex 124 ///< System-call number for `adjtimex`
#define __NR_mprotect 125 ///< System-call number for `mprotect`
#define __NR_sigprocmask 126 ///< System-call number for `sigprocmask`
#define __NR_create_module 127 ///< System-call number for `create_module`
#define __NR_init_module 128 ///< System-call number for `init_module`
#define __NR_delete_module 129 ///< System-call number for `delete_module`
#define __NR_get_kernel_syms 130 ///< System-call number for `get_kernel_syms`
#define __NR_quotactl 131 ///< System-call number for `quotactl`
#define __NR_getpgid 132 ///< System-call number for `getpgid`
#define __NR_fchdir 133 ///< System-call number for `fchdir`
#define __NR_bdflush 134 ///< System-call number for `bdflush`
#define __NR_sysfs 135 ///< System-call number for `sysfs`
#define __NR_personality 136 ///< System-call number for `personality`
#define __NR_setfsuid 138 ///< System-call number for `setfsuid`
#define __NR_setfsgid 139 ///< System-call number for `setfsgid`
#define __NR_llseek 140 ///< System-call number for `llseek`
#define __NR_getdents 141 ///< System-call number for `getdents`
#define __NR_select 142 ///< System-call number for `select`
#define __NR_flock 143 ///< System-call number for `flock`
#define __NR_msync 144 ///< System-call number for `msync`
#define __NR_readv 145 ///< System-call number for `readv`
#define __NR_writev 146 ///< System-call number for `writev`
#define __NR_getsid 147 ///< System-call number for `getsid`
#define __NR_fdatasync 148 ///< System-call number for `fdatasync`
#define __NR_sysctl 149 ///< System-call number for `sysctl`
#define __NR_mlock 150 ///< System-call number for `mlock`
#define __NR_munlock 151 ///< System-call number for `munlock`
#define __NR_mlockall 152 ///< System-call number for `mlockall`
#define __NR_munlockall 153 ///< System-call number for `munlockall`
#define __NR_sched_setparam 154 ///< System-call number for `sched_setparam`
#define __NR_sched_getparam 155 ///< System-call number for `sched_getparam`
#define __NR_sched_setscheduler 156 ///< System-call number for `sched_setscheduler`
#define __NR_sched_getscheduler 157 ///< System-call number for `sched_getscheduler`
#define __NR_sched_yield 158 ///< System-call number for `sched_yield`
#define __NR_sched_get_priority_max 159 ///< System-call number for `sched_get_priority_max`
#define __NR_sched_get_priority_min 160 ///< System-call number for `sched_get_priority_min`
#define __NR_sched_rr_get_interval 161 ///< System-call number for `sched_rr_get_interval`
#define __NR_nanosleep 162 ///< System-call number for `nanosleep`
#define __NR_mremap 163 ///< System-call number for `mremap`
#define __NR_setresuid 164 ///< System-call number for `setresuid`
#define __NR_getresuid 165 ///< System-call number for `getresuid`
#define __NR_vm86 166 ///< System-call number for `vm86`
#define __NR_query_module 167 ///< System-call number for `query_module`
#define __NR_poll 168 ///< System-call number for `poll`
#define __NR_nfsservctl 169 ///< System-call number for `nfsservctl`
#define __NR_setresgid 170 ///< System-call number for `setresgid`
#define __NR_getresgid 171 ///< System-call number for `getresgid`
#define __NR_prctl 172 ///< System-call number for `prctl`
#define __NR_rt_sigreturn 173 ///< System-call number for `rt_sigreturn`
#define __NR_rt_sigaction 174 ///< System-call number for `rt_sigaction`
#define __NR_rt_sigprocmask 175 ///< System-call number for `rt_sigprocmask`
#define __NR_rt_sigpending 176 ///< System-call number for `rt_sigpending`
#define __NR_rt_sigtimedwait 177 ///< System-call number for `rt_sigtimedwait`
#define __NR_rt_sigqueueinfo 178 ///< System-call number for `rt_sigqueueinfo`
#define __NR_rt_sigsuspend 179 ///< System-call number for `rt_sigsuspend`
#define __NR_pread 180 ///< System-call number for `pread`
#define __NR_pwrite 181 ///< System-call number for `pwrite`
#define __NR_chown 182 ///< System-call number for `chown`
#define __NR_getcwd 183 ///< System-call number for `getcwd`
#define __NR_capget 184 ///< System-call number for `capget`
#define __NR_capset 185 ///< System-call number for `capset`
#define __NR_sigaltstack 186 ///< System-call number for `sigaltstack`
#define __NR_sendfile 187 ///< System-call number for `sendfile`
#define __NR_waitperiod 188 ///< System-call number for `waitperiod`
#define __NR_msgctl 189 ///< System-call number for `msgctl`
#define __NR_msgget 190 ///< System-call number for `msgget`
#define __NR_msgrcv 191 ///< System-call number for `msgrcv`
#define __NR_msgsnd 192 ///< System-call number for `msgsnd`
#define __NR_semctl 193 ///< System-call number for `semctl`
#define __NR_semget 194 ///< System-call number for `semget`
#define __NR_semop 195 ///< System-call number for `semop`
#define __NR_shmat 196 ///< System-call number for `shmat`
#define __NR_shmctl 197 ///< System-call number for `shmctl`
#define __NR_shmdt 198 ///< System-call number for `shmdt`
#define __NR_shmget 199 ///< System-call number for `shmget`
#define SYSCALL_NUMBER 200 ///< The total number of system-calls.
+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"