47 Commits

Author SHA1 Message Date
Enrico Fraccaroli (Galfurian) ce9d95e4e8 Merge tag 'v0.6.0' into develop
Release v0.6.0.
2024-01-17 13:50:23 +01:00
Enrico Fraccaroli (Galfurian) c0254bca6d Merge branch 'release/v0.6.0' 2024-01-17 13:50:06 +01:00
Enrico Fraccaroli (Galfurian) 30e01ba560 Update version 2024-01-17 13:49:48 +01:00
Enrico Fraccaroli (Galfurian) af79958f1a Clean up useless files from the filesystem 2024-01-17 13:38:53 +01:00
Enrico Fraccaroli (Galfurian) eca55dfed8 Clean up cmake files (Part 2)
I've kept just one cmake project, in the root directory. The
subdirectories just set up the targets.

The asm compiler is serached just one time, from the root
directory cmake file.

Global compilation flags are set in the root cmake file, and
each subdirectory cmake file sets specific flags if necessary
(e.g., programs need the -u_start specified)
2024-01-17 13:34:32 +01:00
Enrico Fraccaroli (Galfurian) 0b75cd9c2a Clean up cmake files (Part 1)
I've been cleaning up the way compilation flags are passed to the targets
and there are still some changes that must be made, in the next commit.

I've also done some renaming, all_programs into programs and the same for
tests.

The gdb initialization file now is just one, populated using the find command
and using realpath to get the absolute path to the files. I've tested if the
generated gdb.run file works and it does.
2024-01-17 13:16:50 +01:00
Enrico Fraccaroli 24367a58ae Update readme 2024-01-15 11:58:17 +01:00
Enrico Fraccaroli f40c4a6630 Update readme 2024-01-15 11:45:28 +01:00
Enrico Fraccaroli 7ad283d36a Remove windows github workflow 2024-01-15 11:36:04 +01:00
Enrico Fraccaroli e630f89547 Specify the linker 2024-01-15 11:30:52 +01:00
Enrico Fraccaroli 34eeedcbcf Improve the generation of programs and tests. 2024-01-15 11:26:20 +01:00
Enrico Fraccaroli 90ab346195 Remove github action for MacOs 2024-01-15 11:16:11 +01:00
Enrico Fraccaroli 5ce583fdd8 Rollback patch for archive creation that broke clang compilation 2024-01-15 11:14:34 +01:00
Enrico Fraccaroli c2f660f885 Merge pull request #18 from fischerling/improve-gdb-run
do not append to gdb.run
2024-01-15 11:11:11 +01:00
Enrico Fraccaroli 80af9c93fb Merge pull request #17 from fischerling/develop
Improve process termination
2024-01-15 11:10:52 +01:00
Florian Fischer 8b678be2b7 do not append to gdb.run
Currently each time the target gdbinit is executed a new line
containing 'target remote localhost:1234' will be added to the
gdb.run file.
2024-01-13 14:32:03 +01:00
Florian Fischer ef92ba670b exit: properly set the process' exit code when calling exit()
In order to detect the exit status using
WSTATUSCODE ((status & 0xff00) >> 8) the exit code must
be shifted by 8 to the left.

Separate the kernel process exit logic from the actual system call.
2024-01-13 14:31:00 +01:00
Florian Fischer 6f4d3b57f9 libc: fix waitpid not detecting process termination
Since 452aa40770 and the change to
properly return processes exit codes in the status argument, the
status will never be EXIT_ZOMBIE(16) except a process was terminated by
signal(16).

Return from waitpid if either an error occurred (__res < 0) or
we got the status of a child process (__res == cpid).

Additionally fix the weird alignment of the closing braces.
2024-01-13 14:31:00 +01:00
Enrico Fraccaroli (Galfurian) dd39e93194 Try to fix compilation under MacOS 2023-11-30 13:31:49 -05:00
Enrico Fraccaroli (Galfurian) 275cbbe7b3 Try to fix compilation under MacOS 2023-11-30 13:30:19 -05:00
Enrico Fraccaroli (Galfurian) 290ed59d0b Try to fix compilation under MacOS 2023-11-30 13:28:09 -05:00
Enrico Fraccaroli (Galfurian) 3e51197ae4 Try to fix compilation under MacOS 2023-11-30 13:16:09 -05:00
Enrico Fraccaroli (Galfurian) 3d49f0abf6 Try to fix compilation under MacOS 2023-11-30 13:07:13 -05:00
Enrico Fraccaroli (Galfurian) 391bba92a6 Try to fix compilation under MacOS 2023-11-30 13:04:10 -05:00
Enrico Fraccaroli (Galfurian) e96c13ff70 Try to fix compilation under MacOS 2023-11-30 13:02:55 -05:00
Enrico Fraccaroli (Galfurian) 9ef117cbc6 Try to fix compilation under MacOS 2023-11-30 13:01:56 -05:00
Enrico Fraccaroli (Galfurian) af95af6f3a Try to fix compilation under MacOS 2023-11-30 12:59:03 -05:00
Enrico Fraccaroli (Galfurian) d2fd6654eb Try to fix compilation under MacOS 2023-11-30 12:53:16 -05:00
Enrico Fraccaroli (Galfurian) 3fcc0f8964 Use gcc@11 under MacOS 2023-11-30 11:49:41 -05:00
Enrico Fraccaroli (Galfurian) 327e29791e Use gcc@11 under MacOS 2023-11-30 11:47:15 -05:00
Enrico Fraccaroli (Galfurian) f24b962e2b Use gcc@11 under MacOS 2023-11-30 11:44:42 -05:00
Enrico Fraccaroli (Galfurian) 40e4faad90 Use gcc@11 under MacOS 2023-11-30 11:43:45 -05:00
Enrico Fraccaroli (Galfurian) f4c35a09de Use gcc@11 under MacOS 2023-11-30 11:38:17 -05:00
Enrico Fraccaroli (Galfurian) 42d84be2c3 Use gcc@11 under MacOS 2023-11-30 11:35:13 -05:00
Enrico Fraccaroli (Galfurian) 28c00fd9ed Use gcc@11 under MacOS 2023-11-30 11:29:04 -05:00
Enrico Fraccaroli (Galfurian) 379950fb45 Fix minor conversion problems 2023-11-30 11:26:31 -05:00
Enrico Fraccaroli (Galfurian) 4292149567 Use x86_64-elf-gcc under MacOS 2023-11-29 10:45:27 -05:00
Enrico Fraccaroli (Galfurian) 030c16d29e Use x86_64-elf-gcc under MacOS 2023-11-29 10:40:27 -05:00
Enrico Fraccaroli (Galfurian) 29e9d2ff11 Use x86_64-elf-gcc under MacOS 2023-11-29 10:38:44 -05:00
Enrico Fraccaroli (Galfurian) 24b2182bec Use x86_64-elf-gcc under MacOS 2023-11-29 10:37:47 -05:00
Enrico Fraccaroli (Galfurian) a8cfac3c1f Use x86_64-elf-gcc under MacOS 2023-11-29 10:35:08 -05:00
Enrico Fraccaroli (Galfurian) 654a3165c0 Use x86_64-elf-gcc under MacOS 2023-11-29 10:34:42 -05:00
Enrico Fraccaroli (Galfurian) c8544ad6a4 Use x86_64-elf-gcc under MacOS 2023-11-29 10:29:11 -05:00
Enrico Fraccaroli (Galfurian) 61e6954265 Use x86_64-elf-gcc under MacOS 2023-11-29 10:20:23 -05:00
Enrico Fraccaroli (Galfurian) 237bfcefb3 Use x86_64-elf-gcc under MacOS 2023-11-29 10:17:45 -05:00
Enrico Fraccaroli (Galfurian) b7c32fc102 Use x86_64-elf-gcc under MacOS 2023-11-29 10:13:48 -05:00
Enrico Fraccaroli (Galfurian) 2ec77db77a Fix link to homebrew 2023-11-29 10:10:13 -05:00
329 changed files with 1020 additions and 1264 deletions
-36
View File
@@ -1,36 +0,0 @@
name: MacOS
on:
push:
branches-ignore:
- "releases/**"
paths-ignore:
- "**.md"
- ".gitignore"
- "**/ubuntu.yml"
- "**/windows.yml"
pull_request:
paths-ignore:
- "**.md"
- ".gitignore"
- "**/ubuntu.yml"
- "**/windows.yml"
jobs:
build:
name: Build
runs-on: macos-latest
# Set environment variables
#env:
# We globally set CC and CXX.
# CC: x86_64-elf-gcc
# CXX: x86_64-elf-g++
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install git cmake nasm
# x86_64-elf-binutils x86_64-elf-gcc
- name: Build
run: |
cmake -B build
cmake --build build --parallel 2
-36
View File
@@ -1,36 +0,0 @@
name: Windows
on:
push:
branches-ignore:
- "releases/**"
paths-ignore:
- "**.md"
- ".gitignore"
- "**/macos.yml"
- "**/ubuntu.yml"
pull_request:
paths-ignore:
- "**.md"
- ".gitignore"
- "**/macos.yml"
- "**/ubuntu.yml"
jobs:
test:
name: Build
runs-on: windows-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Install dependencies
run: |
choco install nasm
echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Set up MinGW
uses: egor-tensin/setup-mingw@v2
with:
version: latest
platform: x32
- name: Build
run: |
cmake -B build
cmake --build build --parallel 2
+90 -29
View File
@@ -1,14 +1,13 @@
# =============================================================================
# PROJECT SETUP
# =============================================================================
# Set the minimum required version of cmake.
cmake_minimum_required(VERSION 3.1...3.22)
# Initialize the project.
project(mentos C ASM)
# =============================================================================
# BUILD TYPE (Debug/Release)
# =============================================================================
# Set the default build type to Debug.
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Debug' as none was specified.")
@@ -16,12 +15,7 @@ if(NOT CMAKE_BUILD_TYPE)
endif()
# =============================================================================
# DOCUMENTATION
# =============================================================================
add_subdirectory(doc)
# =============================================================================
# OS-SPECIFIC COMPILERS
# OS-SPECIFIC COMPILERS SETUP
# =============================================================================
# Add operating system specific option.
@@ -62,7 +56,73 @@ else()
endif()
# =============================================================================
# COMPILATION
# ASSEMBLY COMPILER
# =============================================================================
# Find the NASM compiler.
find_program(ASM_COMPILER NAMES nasm HINTS /usr/bin/ /usr/local/bin/)
# Mark the variable ASM_COMPILER as advanced.
mark_as_advanced(ASM_COMPILER)
# Check that we have found the compiler.
if(NOT ASM_COMPILER)
message(FATAL_ERROR "ASM compiler not found!")
endif(NOT ASM_COMPILER)
# Set the asm compiler.
set(CMAKE_ASM_COMPILER ${ASM_COMPILER})
# Set the assembly compiler flags.
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f elf -g -O0 -F dwarf -o <OBJECT> <SOURCE>")
else()
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f elf -g -O3 -o <OBJECT> <SOURCE>")
endif()
# =============================================================================
# GLOBAL COMPILATION FLAGS
# =============================================================================
# Warning flags.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpedantic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic-errors")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
# Disable some specific warnings.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unknown-pragmas")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-braces")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-command-line-argument")
# Set the compiler options.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdlib")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-builtin")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-stack-protector")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-pic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcommon")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
# Set the assembly compiler flags.
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -m32")
# =============================================================================
# SUB-DIRECTORIES SETUP
# =============================================================================
# Add the sub-directories.
@@ -70,6 +130,7 @@ add_subdirectory(programs)
add_subdirectory(programs/tests)
add_subdirectory(mentos)
add_subdirectory(libc)
add_subdirectory(doc)
# =============================================================================
# FILESYSTEM
@@ -88,7 +149,7 @@ add_custom_target(filesystem
COMMAND echo '============================================================================='
COMMAND echo 'Done!'
COMMAND echo '============================================================================='
DEPENDS all_programs all_tests
DEPENDS programs tests
)
# =============================================================================
@@ -131,12 +192,12 @@ set(EMULATOR_FLAGS ${EMULATOR_FLAGS} -drive file=${CMAKE_BINARY_DIR}/rootfs.img,
# Booting with QEMU for fun
# =============================================================================
# This first target runs the emualtor passing the kernel binary file.
# This first target runs the emulator passing the kernel binary file.
add_custom_target(
qemu
COMMAND test -e ${CMAKE_BINARY_DIR}/rootfs.img || ${CMAKE_COMMAND} -E cmake_echo_color --red "No filesystem file detected, you need to run: make filesystem"
COMMAND ${EMULATOR} ${EMULATOR_FLAGS} -kernel ${CMAKE_BINARY_DIR}/mentos/kernel-bootloader.bin
DEPENDS kernel-bootloader.bin
COMMAND ${EMULATOR} ${EMULATOR_FLAGS} -kernel ${CMAKE_BINARY_DIR}/mentos/bootloader.bin
DEPENDS bootloader.bin
)
# =============================================================================
@@ -147,19 +208,19 @@ add_custom_target(
# executables.
add_custom_target(
gdbinit
BYPRODUCTS ${CMAKE_BINARY_DIR}/.gdbinit ${CMAKE_BINARY_DIR}/gdb.run
BYPRODUCTS ${CMAKE_BINARY_DIR}/gdb.run
# Create the generic gdb configuration.
COMMAND echo "add-symbol-file ${CMAKE_BINARY_DIR}/mentos/kernel.bin" > ${CMAKE_BINARY_DIR}/.gdbinit
COMMAND echo "add-symbol-file ${CMAKE_BINARY_DIR}/mentos/kernel-bootloader.bin" >> ${CMAKE_BINARY_DIR}/.gdbinit
COMMAND ls -1 ${CMAKE_BINARY_DIR}/programs/tests/test_* | sed 's/^/add-symbol-file /' >> ${CMAKE_BINARY_DIR}/.gdbinit
COMMAND ls -1 ${CMAKE_BINARY_DIR}/programs/prog_* | sed 's/^/add-symbol-file /' >> ${CMAKE_BINARY_DIR}/.gdbinit
COMMAND echo "break boot.c: boot_main" >> ${CMAKE_BINARY_DIR}/.gdbinit
COMMAND echo "break kernel.c: kmain" >> ${CMAKE_BINARY_DIR}/.gdbinit
COMMAND echo "add-symbol-file ${CMAKE_BINARY_DIR}/mentos/kernel.bin" > ${CMAKE_BINARY_DIR}/gdb.run
COMMAND echo "add-symbol-file ${CMAKE_BINARY_DIR}/mentos/bootloader.bin" >> ${CMAKE_BINARY_DIR}/gdb.run
COMMAND find ${CMAKE_SOURCE_DIR}/files/bin -type f | xargs realpath | sed 's/^/add-symbol-file /' >> ${CMAKE_BINARY_DIR}/gdb.run
COMMAND echo "break boot.c: boot_main" >> ${CMAKE_BINARY_DIR}/gdb.run
COMMAND echo "break kernel.c: kmain" >> ${CMAKE_BINARY_DIR}/gdb.run
# Create the GDB connection file.
COMMAND echo "target remote localhost:1234" >> ${CMAKE_BINARY_DIR}/gdb.run
DEPENDS kernel-bootloader.bin
DEPENDS all_programs
DEPENDS all_tests
DEPENDS ${CMAKE_BINARY_DIR}/mentos/bootloader.bin
DEPENDS ${CMAKE_BINARY_DIR}/mentos/kernel.bin
DEPENDS programs
DEPENDS tests
DEPENDS libc
)
@@ -177,8 +238,8 @@ add_custom_target(
COMMAND echo "or if you want to use cgdb, type:"
COMMAND echo " cgdb --quiet --command=gdb.run"
COMMAND echo ""
COMMAND ${EMULATOR} ${EMULATOR_FLAGS} -s -S -kernel ${CMAKE_BINARY_DIR}/mentos/kernel-bootloader.bin
DEPENDS kernel-bootloader.bin
COMMAND ${EMULATOR} ${EMULATOR_FLAGS} -s -S -kernel ${CMAKE_BINARY_DIR}/mentos/bootloader.bin
DEPENDS bootloader.bin
DEPENDS gdbinit
)
@@ -190,9 +251,9 @@ add_custom_target(
add_custom_target(
cdrom.iso
COMMAND cp -rf ${CMAKE_SOURCE_DIR}/iso .
COMMAND cp ${CMAKE_BINARY_DIR}/mentos/kernel-bootloader.bin ${CMAKE_BINARY_DIR}/iso/boot
COMMAND cp ${CMAKE_BINARY_DIR}/mentos/bootloader.bin ${CMAKE_BINARY_DIR}/iso/boot
COMMAND grub-mkrescue -o ${CMAKE_BINARY_DIR}/cdrom.iso ${CMAKE_BINARY_DIR}/iso
DEPENDS kernel-bootloader.bin
DEPENDS bootloader.bin
)
# This third target runs the emualtor, but this time, the kernel binary file is
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2014-2022 MentOs-Team.
Copyright (c) 2014-2024 MentOs-Team.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+47 -55
View File
@@ -5,24 +5,29 @@
[![forthebadge](https://forthebadge.com/images/badges/for-you.svg)](https://forthebadge.com)
[![Ubuntu](https://github.com/mentos-team/MentOS/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/mentos-team/MentOS/actions/workflows/ubuntu.yml)
[![MacOS](https://github.com/mentos-team/MentOS/actions/workflows/macos.yml/badge.svg)](https://github.com/mentos-team/MentOS/actions/workflows/macos.yml)
## Table of Contents
1. [What is MentOS](#1-what-is-mentos)
2. [Implemented features](#2-implemented-features)
3. [Prerequisites](#3-prerequisites)
4. [Compiling MentOS](#4-compiling-mentos)
5. [Generating the EXT2 filesystem](#5-generating-the-ext2-filesystem)
6. [Running MentOS](#6-running-mentos)
7. [Running MentOS from GRUB](#7-running-mentos-from-grub)
8. [Running and adding new programs to MentOS](#8-running-and-adding-new-programs-to-mentos)
9. [Kernel logging](#9-kernel-logging)
10. [Change the scheduling algorithm](#10-change-the-scheduling-algorithm)
11. [Debugging the kernel](#11-debugging-the-kernel)
12. [Contributors](#12-contributors)
- [MentOS (Mentoring Operating System)](#mentos-mentoring-operating-system)
- [Table of Contents](#table-of-contents)
- [What is MentOS](#what-is-mentos)
- [Implemented features](#implemented-features)
- [Prerequisites](#prerequisites)
- [Installing the prerequisites](#installing-the-prerequisites)
- [Compiling MentOS](#compiling-mentos)
- [Generating the EXT2 filesystem](#generating-the-ext2-filesystem)
- [Running MentOS](#running-mentos)
- [Running MentOS from GRUB](#running-mentos-from-grub)
- [Running and adding new programs to MentOS](#running-and-adding-new-programs-to-mentos)
- [Create a new program](#create-a-new-program)
- [Add the new program to the list of compiled sources](#add-the-new-program-to-the-list-of-compiled-sources)
- [Running a program or a test](#running-a-program-or-a-test)
- [Kernel logging](#kernel-logging)
- [Change the scheduling algorithm](#change-the-scheduling-algorithm)
- [Debugging the kernel](#debugging-the-kernel)
- [Contributors](#contributors)
## 1. What is MentOS
## What is MentOS
MentOS (Mentoring Operating System) is an open source educational operating
system. The goal of MentOS is to provide a project environment that is realistic
@@ -46,7 +51,8 @@ Gualandri.
*[Back to the Table of Contents](#table-of-contents)*
## 2. Implemented features
## Implemented features
Follows the list of implemented features:
**Processes and Events**
@@ -91,22 +97,18 @@ I will try to keep it updated...
*[Back to the Table of Contents](#table-of-contents)*
## 3. Prerequisites
## Prerequisites
MentOS is compatible with the main **unix-based** operating systems. It has been
tested with *Ubuntu*, *WSL1*, *WSL2*, and *MacOS*.
tested with *Ubuntu*, and under Windows with *WSL1* and *WSL2*.
### 3.1. Generic Prerequisites
For **compiling** the system we need:
#### 3.1.1. Compile
For compiling the system:
- nasm
- git
- gcc
- nasm
- make
- cmake
- git
- ccmake (suggested)
- e2fsprogs (should be already installed)
@@ -115,43 +117,29 @@ Under **MacOS**, for compiling, you have additional dependencies:
- i386-elf-binutils
- i386-elf-gcc
#### 3.1.2. Execute
To execute the operating system, you need to install:
For **executing** the operating system we need:
- qemu-system-i386 (or qemu-system-x86)
#### 3.1.3. Debug
For debugging we suggest using:
For **debugging** we suggest using:
- gdb or cgdb
### 3.2. installation Prerequisites
### Installing the prerequisites
Under **Ubuntu**, you can type the following commands:
```bash
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y build-essential git cmake qemu-system-x86 nasm e2fsprogs
sudo apt-get install -y git build-essential nasm make cmake cmake-curses-gui e2fsprogs
sudo apt-get install -y qemu-system-x86
sudo apt-get install -y gdb cgdb
```
Note: Older versions might have `qemu-system-i386` instead of `qemu-system-x86`.
Under **MacOS** you also need to install the i386-elf cross-compiler. The
simplest installation method is through Homebrew package manager.
Install [Homebrew](https://brew.sh/index_it) if you don't already have it, and
then type the following commands:
```bash
brew update && brew upgrade
brew install i386-elf-binutils i386-elf-gcc git cmake qemu nasm e2fsprogs
brew install gdb cgdb #<- for debug only
```
*[Back to the Table of Contents](#table-of-contents)*
## 4. Compiling MentOS
## Compiling MentOS
Compile MentOS with:
@@ -165,7 +153,7 @@ make
*[Back to the Table of Contents](#table-of-contents)*
## 5. Generating the EXT2 filesystem
## Generating the EXT2 filesystem
Generate the EXT2 filesystem with:
@@ -176,7 +164,7 @@ you just need to generate the filesystem once. If you change a `program` you nee
*[Back to the Table of Contents](#table-of-contents)*
## 6. Running MentOS
## Running MentOS
Boot MentOS with qemu:
@@ -188,7 +176,7 @@ To login, use one of the usernames listed in `files/etc/passwd`.
*[Back to the Table of Contents](#table-of-contents)*
## 7. Running MentOS from GRUB
## Running MentOS from GRUB
For booting MentOS from GRUB in QEMU we need the following tools:
@@ -211,11 +199,11 @@ make qemu-grub
*[Back to the Table of Contents](#table-of-contents)*
## 8. Running and adding new programs to MentOS
## Running and adding new programs to MentOS
This section explains how to add a new program to MentOS, and also how to run programs in mentos. It also explains how to add new tests, which are located in the `programs/tests` folder.
### 8.1. Create a new program
### Create a new program
Head to the `programs` (or the `programs/tests`) folder. Create and open a new program, for instance a file called `hello_world.c`, with your preferred editor, and add this content to the file:
```C
@@ -228,7 +216,7 @@ int main(int argc, char *argv[])
}
```
### 8.2. Add the new program to the list of compiled sources
### Add the new program to the list of compiled sources
Now we can add the program to the list of files which are compiled and placed inside MentOS filesystem.
The following procedure is the same for both `programs` and `programs/tests`, what changes is which `CMakeLists.txt` file we modify.
@@ -253,7 +241,7 @@ set(TESTS
That's it, the `hello_world.c` file will be compiled and will appear inside the `/bin` or `/bin/tests` folder of MentOS.
### 8.3. Running a program or a test
### Running a program or a test
Once you login into MentOS, if you placed your source code in `programs`, you can execute the program by simply typing:
```bash
hello_world
@@ -268,7 +256,7 @@ However, the `/bin/tests` folder is not listed in `PATH`, so, if you want to exe
*[Back to the Table of Contents](#table-of-contents)*
## 9. Kernel logging
## Kernel logging
The kernel provides ways of printing logging messages *from* inside the kernel code *to* the bash where you executed the `make qemu`.
These *logging* functions are:
@@ -322,7 +310,7 @@ This example sets the `__DEBUG_LEVEL__`, so that all the messages from `INFO` an
*[Back to the Table of Contents](#table-of-contents)*
## 10. Change the scheduling algorithm
## Change the scheduling algorithm
MentOS supports scheduling algorithms for aperiodic:
@@ -390,7 +378,7 @@ make qemu
*[Back to the Table of Contents](#table-of-contents)*
## 11. Debugging the kernel
## Debugging the kernel
If you want to use GDB to debug MentOS, first you need to compile everything:
@@ -450,7 +438,7 @@ to connect to the running process.
*[Back to the Table of Contents](#table-of-contents)*
## 12. Contributors
## Contributors
Project Manager:
@@ -472,5 +460,9 @@ Developers:
- Soft IRQs
- Timer
- Signals
* And many other valuable contributors
* [rouseabout](https://github.com/rouseabout)
* [seekbytes](https://github.com/seekbytes)
* [fischerling](https://github.com/fischerling)
*[Back to the Table of Contents](#table-of-contents)*
+263 -263
View File
@@ -3,7 +3,7 @@ find_package(Doxygen)
if (DOXYGEN_FOUND)
# Read the file with the version.
file(READ ${PROJECT_SOURCE_DIR}/mentos/inc/version.h version_file)
file(READ ${CMAKE_SOURCE_DIR}/mentos/inc/version.h version_file)
# Extract the OS version.
string(REGEX MATCH "OS_MAJOR_VERSION ([0-9]*)" _ ${version_file})
set(OS_MAJOR_VERSION ${CMAKE_MATCH_1})
@@ -15,8 +15,8 @@ if (DOXYGEN_FOUND)
set(DOXYGEN_PROJECT_NAME "MentOS")
set(DOXYGEN_PROJECT_NUMBER "${OS_MAJOR_VERSION}.${OS_MINOR_VERSION}.${OS_MICRO_VERSION}")
set(DOXYGEN_PROJECT_BRIEF "The Mentoring Operating System")
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${PROJECT_SOURCE_DIR}/README.md)
set(DOXYGEN_IMAGE_PATH ${PROJECT_SOURCE_DIR}/doc/resources)
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${CMAKE_SOURCE_DIR}/README.md)
set(DOXYGEN_IMAGE_PATH ${CMAKE_SOURCE_DIR}/doc/resources)
set(DOXYGEN_SHOW_INCLUDE_FILES NO)
set(DOXYGEN_GENERATE_TREEVIEW NO)
set(DOXYGEN_WARN_NO_PARAMDOC YES)
@@ -28,272 +28,272 @@ if (DOXYGEN_FOUND)
set(DOXYGEN_PREDEFINED "__attribute__((x))= _syscall0= _syscall0(x)= _syscall1(x)= _syscall2(x)= _syscall3(x)=")
set(DOXYGEN_WARN_FORMAT "$file($line): $text")
set(DOXYGEN_HTML_STYLESHEET ${PROJECT_SOURCE_DIR}/doc/doxygen.css)
set(DOXYGEN_HTML_STYLESHEET ${CMAKE_SOURCE_DIR}/doc/doxygen.css)
doxygen_add_docs(
${PROJECT_NAME}_documentation
${PROJECT_SOURCE_DIR}/README.md
${PROJECT_SOURCE_DIR}/LICENSE.md
${PROJECT_SOURCE_DIR}/doc/signal.md
${PROJECT_SOURCE_DIR}/doc/syscall.md
mentos_documentation
${CMAKE_SOURCE_DIR}/README.md
${CMAKE_SOURCE_DIR}/LICENSE.md
${CMAKE_SOURCE_DIR}/doc/signal.md
${CMAKE_SOURCE_DIR}/doc/syscall.md
${PROJECT_SOURCE_DIR}/mentos/inc/boot.h
${PROJECT_SOURCE_DIR}/mentos/inc/descriptor_tables/gdt.h
${PROJECT_SOURCE_DIR}/mentos/inc/descriptor_tables/idt.h
${PROJECT_SOURCE_DIR}/mentos/inc/descriptor_tables/isr.h
${PROJECT_SOURCE_DIR}/mentos/inc/descriptor_tables/tss.h
${PROJECT_SOURCE_DIR}/mentos/inc/devices/fpu.h
${PROJECT_SOURCE_DIR}/mentos/inc/devices/pci.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/ata/ata.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/ata/ata_types.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/fdc.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/keyboard/keyboard.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/keyboard/keymap.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/mouse.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/ps2.h
${PROJECT_SOURCE_DIR}/mentos/inc/drivers/rtc.h
${PROJECT_SOURCE_DIR}/mentos/inc/elf/elf.h
${PROJECT_SOURCE_DIR}/mentos/inc/fs/ext2.h
${PROJECT_SOURCE_DIR}/mentos/inc/fs/ioctl.h
${PROJECT_SOURCE_DIR}/mentos/inc/fs/procfs.h
${PROJECT_SOURCE_DIR}/mentos/inc/fs/vfs.h
${PROJECT_SOURCE_DIR}/mentos/inc/fs/vfs_types.h
${PROJECT_SOURCE_DIR}/mentos/inc/hardware/cpuid.h
${PROJECT_SOURCE_DIR}/mentos/inc/hardware/pic8259.h
${PROJECT_SOURCE_DIR}/mentos/inc/hardware/timer.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/proc_modules.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/vga/vga.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/vga/vga_font.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/vga/vga_mode.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/vga/vga_palette.h
${PROJECT_SOURCE_DIR}/mentos/inc/io/video.h
${PROJECT_SOURCE_DIR}/mentos/inc/kernel.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/compiler.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/hashmap.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/irqflags.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/list.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/list_head.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/mutex.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/ndtree.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/rbtree.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/spinlock.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/stack_helper.h
${PROJECT_SOURCE_DIR}/mentos/inc/klib/stdatomic.h
${PROJECT_SOURCE_DIR}/mentos/inc/link_access.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/buddysystem.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/gfp.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/kheap.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/paging.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/slab.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/vmem_map.h
${PROJECT_SOURCE_DIR}/mentos/inc/mem/zone_allocator.h
${PROJECT_SOURCE_DIR}/mentos/inc/multiboot.h
${PROJECT_SOURCE_DIR}/mentos/inc/process/prio.h
${PROJECT_SOURCE_DIR}/mentos/inc/process/process.h
${PROJECT_SOURCE_DIR}/mentos/inc/process/scheduler.h
${PROJECT_SOURCE_DIR}/mentos/inc/process/wait.h
${PROJECT_SOURCE_DIR}/mentos/inc/proc_access.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/errno.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/ipc.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/module.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/reboot.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/types.h
${PROJECT_SOURCE_DIR}/mentos/inc/sys/utsname.h
${PROJECT_SOURCE_DIR}/mentos/inc/system/panic.h
${PROJECT_SOURCE_DIR}/mentos/inc/system/printk.h
${PROJECT_SOURCE_DIR}/mentos/inc/system/signal.h
${PROJECT_SOURCE_DIR}/mentos/inc/system/syscall.h
${PROJECT_SOURCE_DIR}/mentos/inc/version.h
${CMAKE_SOURCE_DIR}/mentos/inc/boot.h
${CMAKE_SOURCE_DIR}/mentos/inc/descriptor_tables/gdt.h
${CMAKE_SOURCE_DIR}/mentos/inc/descriptor_tables/idt.h
${CMAKE_SOURCE_DIR}/mentos/inc/descriptor_tables/isr.h
${CMAKE_SOURCE_DIR}/mentos/inc/descriptor_tables/tss.h
${CMAKE_SOURCE_DIR}/mentos/inc/devices/fpu.h
${CMAKE_SOURCE_DIR}/mentos/inc/devices/pci.h
${CMAKE_SOURCE_DIR}/mentos/inc/drivers/ata/ata.h
${CMAKE_SOURCE_DIR}/mentos/inc/drivers/ata/ata_types.h
${CMAKE_SOURCE_DIR}/mentos/inc/drivers/fdc.h
${CMAKE_SOURCE_DIR}/mentos/inc/drivers/keyboard/keyboard.h
${CMAKE_SOURCE_DIR}/mentos/inc/drivers/keyboard/keymap.h
${CMAKE_SOURCE_DIR}/mentos/inc/drivers/mouse.h
${CMAKE_SOURCE_DIR}/mentos/inc/drivers/ps2.h
${CMAKE_SOURCE_DIR}/mentos/inc/drivers/rtc.h
${CMAKE_SOURCE_DIR}/mentos/inc/elf/elf.h
${CMAKE_SOURCE_DIR}/mentos/inc/fs/ext2.h
${CMAKE_SOURCE_DIR}/mentos/inc/fs/ioctl.h
${CMAKE_SOURCE_DIR}/mentos/inc/fs/procfs.h
${CMAKE_SOURCE_DIR}/mentos/inc/fs/vfs.h
${CMAKE_SOURCE_DIR}/mentos/inc/fs/vfs_types.h
${CMAKE_SOURCE_DIR}/mentos/inc/hardware/cpuid.h
${CMAKE_SOURCE_DIR}/mentos/inc/hardware/pic8259.h
${CMAKE_SOURCE_DIR}/mentos/inc/hardware/timer.h
${CMAKE_SOURCE_DIR}/mentos/inc/io/proc_modules.h
${CMAKE_SOURCE_DIR}/mentos/inc/io/vga/vga.h
${CMAKE_SOURCE_DIR}/mentos/inc/io/vga/vga_font.h
${CMAKE_SOURCE_DIR}/mentos/inc/io/vga/vga_mode.h
${CMAKE_SOURCE_DIR}/mentos/inc/io/vga/vga_palette.h
${CMAKE_SOURCE_DIR}/mentos/inc/io/video.h
${CMAKE_SOURCE_DIR}/mentos/inc/kernel.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/compiler.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/hashmap.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/irqflags.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/list.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/list_head.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/mutex.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/ndtree.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/rbtree.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/spinlock.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/stack_helper.h
${CMAKE_SOURCE_DIR}/mentos/inc/klib/stdatomic.h
${CMAKE_SOURCE_DIR}/mentos/inc/link_access.h
${CMAKE_SOURCE_DIR}/mentos/inc/mem/buddysystem.h
${CMAKE_SOURCE_DIR}/mentos/inc/mem/gfp.h
${CMAKE_SOURCE_DIR}/mentos/inc/mem/kheap.h
${CMAKE_SOURCE_DIR}/mentos/inc/mem/paging.h
${CMAKE_SOURCE_DIR}/mentos/inc/mem/slab.h
${CMAKE_SOURCE_DIR}/mentos/inc/mem/vmem_map.h
${CMAKE_SOURCE_DIR}/mentos/inc/mem/zone_allocator.h
${CMAKE_SOURCE_DIR}/mentos/inc/multiboot.h
${CMAKE_SOURCE_DIR}/mentos/inc/process/prio.h
${CMAKE_SOURCE_DIR}/mentos/inc/process/process.h
${CMAKE_SOURCE_DIR}/mentos/inc/process/scheduler.h
${CMAKE_SOURCE_DIR}/mentos/inc/process/wait.h
${CMAKE_SOURCE_DIR}/mentos/inc/proc_access.h
${CMAKE_SOURCE_DIR}/mentos/inc/sys/errno.h
${CMAKE_SOURCE_DIR}/mentos/inc/sys/ipc.h
${CMAKE_SOURCE_DIR}/mentos/inc/sys/module.h
${CMAKE_SOURCE_DIR}/mentos/inc/sys/reboot.h
${CMAKE_SOURCE_DIR}/mentos/inc/sys/types.h
${CMAKE_SOURCE_DIR}/mentos/inc/sys/utsname.h
${CMAKE_SOURCE_DIR}/mentos/inc/system/panic.h
${CMAKE_SOURCE_DIR}/mentos/inc/system/printk.h
${CMAKE_SOURCE_DIR}/mentos/inc/system/signal.h
${CMAKE_SOURCE_DIR}/mentos/inc/system/syscall.h
${CMAKE_SOURCE_DIR}/mentos/inc/version.h
${PROJECT_SOURCE_DIR}/mentos/src/boot.c
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/exception.c
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/gdt.c
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/idt.c
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/interrupt.c
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/tss.c
${PROJECT_SOURCE_DIR}/mentos/src/devices/fpu.c
${PROJECT_SOURCE_DIR}/mentos/src/devices/pci.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/ata.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/fdc.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/keyboard/keyboard.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/keyboard/keymap.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/mouse.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/ps2.c
${PROJECT_SOURCE_DIR}/mentos/src/drivers/rtc.c
${PROJECT_SOURCE_DIR}/mentos/src/elf/elf.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/ext2.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/ioctl.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/namei.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/open.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/procfs.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/readdir.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/read_write.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/stat.c
${PROJECT_SOURCE_DIR}/mentos/src/fs/vfs.c
${PROJECT_SOURCE_DIR}/mentos/src/hardware/cpuid.c
${PROJECT_SOURCE_DIR}/mentos/src/hardware/pic8259.c
${PROJECT_SOURCE_DIR}/mentos/src/hardware/timer.c
${PROJECT_SOURCE_DIR}/mentos/src/io/debug.c
${PROJECT_SOURCE_DIR}/mentos/src/io/mm_io.c
${PROJECT_SOURCE_DIR}/mentos/src/io/proc_running.c
${PROJECT_SOURCE_DIR}/mentos/src/io/proc_system.c
${PROJECT_SOURCE_DIR}/mentos/src/io/proc_video.c
${PROJECT_SOURCE_DIR}/mentos/src/io/stdio.c
${PROJECT_SOURCE_DIR}/mentos/src/io/vga/vga.c
${PROJECT_SOURCE_DIR}/mentos/src/io/video.c
${PROJECT_SOURCE_DIR}/mentos/src/ipc/msg.c
${PROJECT_SOURCE_DIR}/mentos/src/ipc/sem.c
${PROJECT_SOURCE_DIR}/mentos/src/ipc/shm.c
${PROJECT_SOURCE_DIR}/mentos/src/kernel/sys.c
${PROJECT_SOURCE_DIR}/mentos/src/kernel.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/assert.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/ctype.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/fcvt.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/hashmap.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/libgen.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/list.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/math.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/mutex.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/ndtree.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/rbtree.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/spinlock.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/strerror.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/string.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/time.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/vscanf.c
${PROJECT_SOURCE_DIR}/mentos/src/klib/vsprintf.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/buddysystem.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/kheap.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/paging.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/slab.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/vmem_map.c
${PROJECT_SOURCE_DIR}/mentos/src/mem/zone_allocator.c
${PROJECT_SOURCE_DIR}/mentos/src/multiboot.c
${PROJECT_SOURCE_DIR}/mentos/src/process/process.c
${PROJECT_SOURCE_DIR}/mentos/src/process/scheduler.c
${PROJECT_SOURCE_DIR}/mentos/src/process/scheduler_algorithm.c
${PROJECT_SOURCE_DIR}/mentos/src/process/wait.c
${PROJECT_SOURCE_DIR}/mentos/src/sys/module.c
${PROJECT_SOURCE_DIR}/mentos/src/sys/utsname.c
${PROJECT_SOURCE_DIR}/mentos/src/system/errno.c
${PROJECT_SOURCE_DIR}/mentos/src/system/panic.c
${PROJECT_SOURCE_DIR}/mentos/src/system/printk.c
${PROJECT_SOURCE_DIR}/mentos/src/system/signal.c
${PROJECT_SOURCE_DIR}/mentos/src/system/syscall.c
${CMAKE_SOURCE_DIR}/mentos/src/boot.c
${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/exception.c
${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/gdt.c
${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/idt.c
${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/interrupt.c
${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/tss.c
${CMAKE_SOURCE_DIR}/mentos/src/devices/fpu.c
${CMAKE_SOURCE_DIR}/mentos/src/devices/pci.c
${CMAKE_SOURCE_DIR}/mentos/src/drivers/ata.c
${CMAKE_SOURCE_DIR}/mentos/src/drivers/fdc.c
${CMAKE_SOURCE_DIR}/mentos/src/drivers/keyboard/keyboard.c
${CMAKE_SOURCE_DIR}/mentos/src/drivers/keyboard/keymap.c
${CMAKE_SOURCE_DIR}/mentos/src/drivers/mouse.c
${CMAKE_SOURCE_DIR}/mentos/src/drivers/ps2.c
${CMAKE_SOURCE_DIR}/mentos/src/drivers/rtc.c
${CMAKE_SOURCE_DIR}/mentos/src/elf/elf.c
${CMAKE_SOURCE_DIR}/mentos/src/fs/ext2.c
${CMAKE_SOURCE_DIR}/mentos/src/fs/ioctl.c
${CMAKE_SOURCE_DIR}/mentos/src/fs/namei.c
${CMAKE_SOURCE_DIR}/mentos/src/fs/open.c
${CMAKE_SOURCE_DIR}/mentos/src/fs/procfs.c
${CMAKE_SOURCE_DIR}/mentos/src/fs/readdir.c
${CMAKE_SOURCE_DIR}/mentos/src/fs/read_write.c
${CMAKE_SOURCE_DIR}/mentos/src/fs/stat.c
${CMAKE_SOURCE_DIR}/mentos/src/fs/vfs.c
${CMAKE_SOURCE_DIR}/mentos/src/hardware/cpuid.c
${CMAKE_SOURCE_DIR}/mentos/src/hardware/pic8259.c
${CMAKE_SOURCE_DIR}/mentos/src/hardware/timer.c
${CMAKE_SOURCE_DIR}/mentos/src/io/debug.c
${CMAKE_SOURCE_DIR}/mentos/src/io/mm_io.c
${CMAKE_SOURCE_DIR}/mentos/src/io/proc_running.c
${CMAKE_SOURCE_DIR}/mentos/src/io/proc_system.c
${CMAKE_SOURCE_DIR}/mentos/src/io/proc_video.c
${CMAKE_SOURCE_DIR}/mentos/src/io/stdio.c
${CMAKE_SOURCE_DIR}/mentos/src/io/vga/vga.c
${CMAKE_SOURCE_DIR}/mentos/src/io/video.c
${CMAKE_SOURCE_DIR}/mentos/src/ipc/msg.c
${CMAKE_SOURCE_DIR}/mentos/src/ipc/sem.c
${CMAKE_SOURCE_DIR}/mentos/src/ipc/shm.c
${CMAKE_SOURCE_DIR}/mentos/src/kernel/sys.c
${CMAKE_SOURCE_DIR}/mentos/src/kernel.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/assert.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/ctype.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/fcvt.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/hashmap.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/libgen.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/list.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/math.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/mutex.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/ndtree.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/rbtree.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/spinlock.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/strerror.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/string.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/time.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/vscanf.c
${CMAKE_SOURCE_DIR}/mentos/src/klib/vsprintf.c
${CMAKE_SOURCE_DIR}/mentos/src/mem/buddysystem.c
${CMAKE_SOURCE_DIR}/mentos/src/mem/kheap.c
${CMAKE_SOURCE_DIR}/mentos/src/mem/paging.c
${CMAKE_SOURCE_DIR}/mentos/src/mem/slab.c
${CMAKE_SOURCE_DIR}/mentos/src/mem/vmem_map.c
${CMAKE_SOURCE_DIR}/mentos/src/mem/zone_allocator.c
${CMAKE_SOURCE_DIR}/mentos/src/multiboot.c
${CMAKE_SOURCE_DIR}/mentos/src/process/process.c
${CMAKE_SOURCE_DIR}/mentos/src/process/scheduler.c
${CMAKE_SOURCE_DIR}/mentos/src/process/scheduler_algorithm.c
${CMAKE_SOURCE_DIR}/mentos/src/process/wait.c
${CMAKE_SOURCE_DIR}/mentos/src/sys/module.c
${CMAKE_SOURCE_DIR}/mentos/src/sys/utsname.c
${CMAKE_SOURCE_DIR}/mentos/src/system/errno.c
${CMAKE_SOURCE_DIR}/mentos/src/system/panic.c
${CMAKE_SOURCE_DIR}/mentos/src/system/printk.c
${CMAKE_SOURCE_DIR}/mentos/src/system/signal.c
${CMAKE_SOURCE_DIR}/mentos/src/system/syscall.c
${PROJECT_SOURCE_DIR}/mentos/src/boot.S
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/exception.S
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/gdt.S
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/idt.S
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/interrupt.S
${PROJECT_SOURCE_DIR}/mentos/src/descriptor_tables/tss.S
${PROJECT_SOURCE_DIR}/mentos/src/process/user.S
${CMAKE_SOURCE_DIR}/mentos/src/boot.S
${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/exception.S
${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/gdt.S
${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/idt.S
${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/interrupt.S
${CMAKE_SOURCE_DIR}/mentos/src/descriptor_tables/tss.S
${CMAKE_SOURCE_DIR}/mentos/src/process/user.S
${PROJECT_SOURCE_DIR}/libc/inc/array.h
${PROJECT_SOURCE_DIR}/libc/inc/assert.h
${PROJECT_SOURCE_DIR}/libc/inc/bits/ioctls.h
${PROJECT_SOURCE_DIR}/libc/inc/bits/stat.h
${PROJECT_SOURCE_DIR}/libc/inc/bits/termios-struct.h
${PROJECT_SOURCE_DIR}/libc/inc/ctype.h
${PROJECT_SOURCE_DIR}/libc/inc/fcntl.h
${PROJECT_SOURCE_DIR}/libc/inc/fcvt.h
${PROJECT_SOURCE_DIR}/libc/inc/grp.h
${PROJECT_SOURCE_DIR}/libc/inc/io/ansi_colors.h
${PROJECT_SOURCE_DIR}/libc/inc/io/debug.h
${PROJECT_SOURCE_DIR}/libc/inc/io/mm_io.h
${PROJECT_SOURCE_DIR}/libc/inc/io/port_io.h
${PROJECT_SOURCE_DIR}/libc/inc/ipc/ipc.h
${PROJECT_SOURCE_DIR}/libc/inc/ipc/msg.h
${PROJECT_SOURCE_DIR}/libc/inc/ipc/sem.h
${PROJECT_SOURCE_DIR}/libc/inc/ipc/shm.h
${PROJECT_SOURCE_DIR}/libc/inc/libgen.h
${PROJECT_SOURCE_DIR}/libc/inc/limits.h
${PROJECT_SOURCE_DIR}/libc/inc/math.h
${PROJECT_SOURCE_DIR}/libc/inc/pwd.h
${PROJECT_SOURCE_DIR}/libc/inc/ring_buffer.h
${PROJECT_SOURCE_DIR}/libc/inc/sched.h
${PROJECT_SOURCE_DIR}/libc/inc/signal.h
${PROJECT_SOURCE_DIR}/libc/inc/stdarg.h
${PROJECT_SOURCE_DIR}/libc/inc/stdbool.h
${PROJECT_SOURCE_DIR}/libc/inc/stddef.h
${PROJECT_SOURCE_DIR}/libc/inc/stdint.h
${PROJECT_SOURCE_DIR}/libc/inc/stdio.h
${PROJECT_SOURCE_DIR}/libc/inc/stdlib.h
${PROJECT_SOURCE_DIR}/libc/inc/strerror.h
${PROJECT_SOURCE_DIR}/libc/inc/string.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/bitops.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/dirent.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/errno.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/ioctl.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/kernel_levels.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/reboot.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/stat.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/types.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/unistd.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/utsname.h
${PROJECT_SOURCE_DIR}/libc/inc/sys/wait.h
${PROJECT_SOURCE_DIR}/libc/inc/system/syscall_types.h
${PROJECT_SOURCE_DIR}/libc/inc/termios.h
${PROJECT_SOURCE_DIR}/libc/inc/time.h
${CMAKE_SOURCE_DIR}/libc/inc/array.h
${CMAKE_SOURCE_DIR}/libc/inc/assert.h
${CMAKE_SOURCE_DIR}/libc/inc/bits/ioctls.h
${CMAKE_SOURCE_DIR}/libc/inc/bits/stat.h
${CMAKE_SOURCE_DIR}/libc/inc/bits/termios-struct.h
${CMAKE_SOURCE_DIR}/libc/inc/ctype.h
${CMAKE_SOURCE_DIR}/libc/inc/fcntl.h
${CMAKE_SOURCE_DIR}/libc/inc/fcvt.h
${CMAKE_SOURCE_DIR}/libc/inc/grp.h
${CMAKE_SOURCE_DIR}/libc/inc/io/ansi_colors.h
${CMAKE_SOURCE_DIR}/libc/inc/io/debug.h
${CMAKE_SOURCE_DIR}/libc/inc/io/mm_io.h
${CMAKE_SOURCE_DIR}/libc/inc/io/port_io.h
${CMAKE_SOURCE_DIR}/libc/inc/ipc/ipc.h
${CMAKE_SOURCE_DIR}/libc/inc/ipc/msg.h
${CMAKE_SOURCE_DIR}/libc/inc/ipc/sem.h
${CMAKE_SOURCE_DIR}/libc/inc/ipc/shm.h
${CMAKE_SOURCE_DIR}/libc/inc/libgen.h
${CMAKE_SOURCE_DIR}/libc/inc/limits.h
${CMAKE_SOURCE_DIR}/libc/inc/math.h
${CMAKE_SOURCE_DIR}/libc/inc/pwd.h
${CMAKE_SOURCE_DIR}/libc/inc/ring_buffer.h
${CMAKE_SOURCE_DIR}/libc/inc/sched.h
${CMAKE_SOURCE_DIR}/libc/inc/signal.h
${CMAKE_SOURCE_DIR}/libc/inc/stdarg.h
${CMAKE_SOURCE_DIR}/libc/inc/stdbool.h
${CMAKE_SOURCE_DIR}/libc/inc/stddef.h
${CMAKE_SOURCE_DIR}/libc/inc/stdint.h
${CMAKE_SOURCE_DIR}/libc/inc/stdio.h
${CMAKE_SOURCE_DIR}/libc/inc/stdlib.h
${CMAKE_SOURCE_DIR}/libc/inc/strerror.h
${CMAKE_SOURCE_DIR}/libc/inc/string.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/bitops.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/dirent.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/errno.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/ioctl.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/kernel_levels.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/reboot.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/stat.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/types.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/unistd.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/utsname.h
${CMAKE_SOURCE_DIR}/libc/inc/sys/wait.h
${CMAKE_SOURCE_DIR}/libc/inc/system/syscall_types.h
${CMAKE_SOURCE_DIR}/libc/inc/termios.h
${CMAKE_SOURCE_DIR}/libc/inc/time.h
${PROJECT_SOURCE_DIR}/libc/src/abort.c
${PROJECT_SOURCE_DIR}/libc/src/assert.c
${PROJECT_SOURCE_DIR}/libc/src/ctype.c
${PROJECT_SOURCE_DIR}/libc/src/fcvt.c
${PROJECT_SOURCE_DIR}/libc/src/grp.c
${PROJECT_SOURCE_DIR}/libc/src/io/debug.c
${PROJECT_SOURCE_DIR}/libc/src/io/mm_io.c
${PROJECT_SOURCE_DIR}/libc/src/ipc/ipc.c
${PROJECT_SOURCE_DIR}/libc/src/libc_start.c
${PROJECT_SOURCE_DIR}/libc/src/libgen.c
${PROJECT_SOURCE_DIR}/libc/src/math.c
${PROJECT_SOURCE_DIR}/libc/src/pwd.c
${PROJECT_SOURCE_DIR}/libc/src/sched.c
${PROJECT_SOURCE_DIR}/libc/src/setenv.c
${PROJECT_SOURCE_DIR}/libc/src/stdio.c
${PROJECT_SOURCE_DIR}/libc/src/stdlib.c
${PROJECT_SOURCE_DIR}/libc/src/strerror.c
${PROJECT_SOURCE_DIR}/libc/src/string.c
${PROJECT_SOURCE_DIR}/libc/src/sys/errno.c
${PROJECT_SOURCE_DIR}/libc/src/sys/ioctl.c
${PROJECT_SOURCE_DIR}/libc/src/sys/unistd.c
${PROJECT_SOURCE_DIR}/libc/src/sys/utsname.c
${PROJECT_SOURCE_DIR}/libc/src/termios.c
${PROJECT_SOURCE_DIR}/libc/src/time.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/chdir.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/close.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/creat.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/exec.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/exit.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/fork.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getcwd.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getdents.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getgid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getpgid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getpid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getppid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getsid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/getuid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/interval.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/kill.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/lseek.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/mkdir.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/nice.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/open.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/read.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/reboot.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/rmdir.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/setgid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/setpgid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/setsid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/setuid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/signal.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/stat.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/unlink.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/waitpid.c
${PROJECT_SOURCE_DIR}/libc/src/unistd/write.c
${PROJECT_SOURCE_DIR}/libc/src/vscanf.c
${PROJECT_SOURCE_DIR}/libc/src/vsprintf.c
${CMAKE_SOURCE_DIR}/libc/src/abort.c
${CMAKE_SOURCE_DIR}/libc/src/assert.c
${CMAKE_SOURCE_DIR}/libc/src/ctype.c
${CMAKE_SOURCE_DIR}/libc/src/fcvt.c
${CMAKE_SOURCE_DIR}/libc/src/grp.c
${CMAKE_SOURCE_DIR}/libc/src/io/debug.c
${CMAKE_SOURCE_DIR}/libc/src/io/mm_io.c
${CMAKE_SOURCE_DIR}/libc/src/ipc/ipc.c
${CMAKE_SOURCE_DIR}/libc/src/libc_start.c
${CMAKE_SOURCE_DIR}/libc/src/libgen.c
${CMAKE_SOURCE_DIR}/libc/src/math.c
${CMAKE_SOURCE_DIR}/libc/src/pwd.c
${CMAKE_SOURCE_DIR}/libc/src/sched.c
${CMAKE_SOURCE_DIR}/libc/src/setenv.c
${CMAKE_SOURCE_DIR}/libc/src/stdio.c
${CMAKE_SOURCE_DIR}/libc/src/stdlib.c
${CMAKE_SOURCE_DIR}/libc/src/strerror.c
${CMAKE_SOURCE_DIR}/libc/src/string.c
${CMAKE_SOURCE_DIR}/libc/src/sys/errno.c
${CMAKE_SOURCE_DIR}/libc/src/sys/ioctl.c
${CMAKE_SOURCE_DIR}/libc/src/sys/unistd.c
${CMAKE_SOURCE_DIR}/libc/src/sys/utsname.c
${CMAKE_SOURCE_DIR}/libc/src/termios.c
${CMAKE_SOURCE_DIR}/libc/src/time.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/chdir.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/close.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/creat.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/exec.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/exit.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/fork.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getcwd.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getdents.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getgid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getpgid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getpid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getppid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getsid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getuid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/interval.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/kill.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/lseek.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/mkdir.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/nice.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/open.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/read.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/reboot.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/rmdir.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/setgid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/setpgid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/setsid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/setuid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/signal.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/stat.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/unlink.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/waitpid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/write.c
${CMAKE_SOURCE_DIR}/libc/src/vscanf.c
${CMAKE_SOURCE_DIR}/libc/src/vsprintf.c
${PROJECT_SOURCE_DIR}/libc/src/crt0.S
${CMAKE_SOURCE_DIR}/libc/src/crt0.S
)
endif (DOXYGEN_FOUND)
+2 -3
View File
@@ -1,9 +1,8 @@
MentOS 0.1
MentOS 0.6.0
Welcome to the MentOS, the Mentoring Operating System.
If you want some help enter the "help" command into the cli.
If you want some help enter the "man" command into the cli.
Bye,
The Ment(OS) Team
-1
View File
@@ -1 +0,0 @@
io ti vi bi!
-1
View File
@@ -1 +0,0 @@
tanto questa e' solo una prova :\
-1
View File
@@ -1 +0,0 @@
ciao mondo
-3
View File
@@ -1,3 +0,0 @@
come va ?
AAA
-1
View File
@@ -1 +0,0 @@
bho, io credo bene eh eh eh
-1
View File
@@ -1 +0,0 @@
tanto questa e' solo una prova :\
-1
View File
@@ -1 +0,0 @@
io ti vi bi!
+67 -136
View File
@@ -1,146 +1,77 @@
# =============================================================================
# Author: Enrico Fraccaroli
# =============================================================================
# Set the minimum required version of cmake.
cmake_minimum_required(VERSION 3.1...3.22)
# Initialize the project.
project(libc C ASM)
# =============================================================================
# ASSEMBLY
# LIBRARY
# =============================================================================
# Enable the assembly language.
enable_language(ASM)
# Find the NASM compiler.
find_program(ASM_COMPILER NAMES nasm HINTS /usr/bin/ /usr/local/bin/)
# Mark the variable ASM_COMPILER as advanced.
mark_as_advanced(ASM_COMPILER)
# Check that we have found the compiler.
if(NOT ASM_COMPILER)
message(FATAL_ERROR "ASM compiler not found!")
endif(NOT ASM_COMPILER)
# Set the asm compiler.
set(CMAKE_ASM_COMPILER ${ASM_COMPILER})
# Set the assembly compiler flags.
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f elf -g -O0 -F dwarf -o <OBJECT> <SOURCE>")
else()
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -f elf -g -O3 -o <OBJECT> <SOURCE>")
endif()
# =============================================================================
# C WARNINGs
# =============================================================================
# Warning flags.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpedantic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic-errors")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wshadow")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
# Disable some specific warnings.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unknown-pragmas")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-braces")
# Set the compiler options.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdlib")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-builtin")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-stack-protector")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-pic")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fomit-frame-pointer")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcommon")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
# =============================================================================
# Add the library.
add_library(
${PROJECT_NAME}
${PROJECT_SOURCE_DIR}/src/stdio.c
${PROJECT_SOURCE_DIR}/src/ctype.c
${PROJECT_SOURCE_DIR}/src/string.c
${PROJECT_SOURCE_DIR}/src/stdlib.c
${PROJECT_SOURCE_DIR}/src/math.c
${PROJECT_SOURCE_DIR}/src/fcvt.c
${PROJECT_SOURCE_DIR}/src/time.c
${PROJECT_SOURCE_DIR}/src/strerror.c
${PROJECT_SOURCE_DIR}/src/termios.c
${PROJECT_SOURCE_DIR}/src/libgen.c
${PROJECT_SOURCE_DIR}/src/vsprintf.c
${PROJECT_SOURCE_DIR}/src/vscanf.c
${PROJECT_SOURCE_DIR}/src/pwd.c
${PROJECT_SOURCE_DIR}/src/grp.c
${PROJECT_SOURCE_DIR}/src/sched.c
${PROJECT_SOURCE_DIR}/src/readline.c
${PROJECT_SOURCE_DIR}/src/setenv.c
${PROJECT_SOURCE_DIR}/src/assert.c
${PROJECT_SOURCE_DIR}/src/abort.c
${PROJECT_SOURCE_DIR}/src/io/mm_io.c
${PROJECT_SOURCE_DIR}/src/io/debug.c
${PROJECT_SOURCE_DIR}/src/sys/ipc.c
${PROJECT_SOURCE_DIR}/src/sys/unistd.c
${PROJECT_SOURCE_DIR}/src/sys/errno.c
${PROJECT_SOURCE_DIR}/src/sys/utsname.c
${PROJECT_SOURCE_DIR}/src/sys/mman.c
${PROJECT_SOURCE_DIR}/src/sys/ioctl.c
${PROJECT_SOURCE_DIR}/src/unistd/creat.c
${PROJECT_SOURCE_DIR}/src/unistd/getppid.c
${PROJECT_SOURCE_DIR}/src/unistd/getpid.c
${PROJECT_SOURCE_DIR}/src/unistd/exit.c
${PROJECT_SOURCE_DIR}/src/unistd/setsid.c
${PROJECT_SOURCE_DIR}/src/unistd/getsid.c
${PROJECT_SOURCE_DIR}/src/unistd/setpgid.c
${PROJECT_SOURCE_DIR}/src/unistd/getpgid.c
${PROJECT_SOURCE_DIR}/src/unistd/setgid.c
${PROJECT_SOURCE_DIR}/src/unistd/getgid.c
${PROJECT_SOURCE_DIR}/src/unistd/setuid.c
${PROJECT_SOURCE_DIR}/src/unistd/getuid.c
${PROJECT_SOURCE_DIR}/src/unistd/fork.c
${PROJECT_SOURCE_DIR}/src/unistd/read.c
${PROJECT_SOURCE_DIR}/src/unistd/write.c
${PROJECT_SOURCE_DIR}/src/unistd/exec.c
${PROJECT_SOURCE_DIR}/src/unistd/nice.c
${PROJECT_SOURCE_DIR}/src/unistd/open.c
${PROJECT_SOURCE_DIR}/src/unistd/reboot.c
${PROJECT_SOURCE_DIR}/src/unistd/waitpid.c
${PROJECT_SOURCE_DIR}/src/unistd/chdir.c
${PROJECT_SOURCE_DIR}/src/unistd/getcwd.c
${PROJECT_SOURCE_DIR}/src/unistd/close.c
${PROJECT_SOURCE_DIR}/src/unistd/stat.c
${PROJECT_SOURCE_DIR}/src/unistd/rmdir.c
${PROJECT_SOURCE_DIR}/src/unistd/mkdir.c
${PROJECT_SOURCE_DIR}/src/unistd/unlink.c
${PROJECT_SOURCE_DIR}/src/unistd/getdents.c
${PROJECT_SOURCE_DIR}/src/unistd/lseek.c
${PROJECT_SOURCE_DIR}/src/unistd/kill.c
${PROJECT_SOURCE_DIR}/src/unistd/signal.c
${PROJECT_SOURCE_DIR}/src/unistd/interval.c
${PROJECT_SOURCE_DIR}/src/unistd/symlink.c
${PROJECT_SOURCE_DIR}/src/unistd/readlink.c
${PROJECT_SOURCE_DIR}/src/libc_start.c
${PROJECT_SOURCE_DIR}/src/crt0.S
libc
${CMAKE_SOURCE_DIR}/libc/src/stdio.c
${CMAKE_SOURCE_DIR}/libc/src/ctype.c
${CMAKE_SOURCE_DIR}/libc/src/string.c
${CMAKE_SOURCE_DIR}/libc/src/stdlib.c
${CMAKE_SOURCE_DIR}/libc/src/math.c
${CMAKE_SOURCE_DIR}/libc/src/fcvt.c
${CMAKE_SOURCE_DIR}/libc/src/time.c
${CMAKE_SOURCE_DIR}/libc/src/strerror.c
${CMAKE_SOURCE_DIR}/libc/src/termios.c
${CMAKE_SOURCE_DIR}/libc/src/libgen.c
${CMAKE_SOURCE_DIR}/libc/src/vsprintf.c
${CMAKE_SOURCE_DIR}/libc/src/vscanf.c
${CMAKE_SOURCE_DIR}/libc/src/pwd.c
${CMAKE_SOURCE_DIR}/libc/src/grp.c
${CMAKE_SOURCE_DIR}/libc/src/sched.c
${CMAKE_SOURCE_DIR}/libc/src/readline.c
${CMAKE_SOURCE_DIR}/libc/src/setenv.c
${CMAKE_SOURCE_DIR}/libc/src/assert.c
${CMAKE_SOURCE_DIR}/libc/src/abort.c
${CMAKE_SOURCE_DIR}/libc/src/io/mm_io.c
${CMAKE_SOURCE_DIR}/libc/src/io/debug.c
${CMAKE_SOURCE_DIR}/libc/src/sys/ipc.c
${CMAKE_SOURCE_DIR}/libc/src/sys/unistd.c
${CMAKE_SOURCE_DIR}/libc/src/sys/errno.c
${CMAKE_SOURCE_DIR}/libc/src/sys/utsname.c
${CMAKE_SOURCE_DIR}/libc/src/sys/mman.c
${CMAKE_SOURCE_DIR}/libc/src/sys/ioctl.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/creat.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getppid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getpid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/exit.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/setsid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getsid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/setpgid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getpgid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/setgid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getgid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/setuid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getuid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/fork.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/read.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/write.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/exec.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/nice.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/open.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/reboot.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/waitpid.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/chdir.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getcwd.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/close.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/stat.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/rmdir.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/mkdir.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/unlink.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/getdents.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/lseek.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/kill.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/signal.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/interval.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/symlink.c
${CMAKE_SOURCE_DIR}/libc/src/unistd/readlink.c
${CMAKE_SOURCE_DIR}/libc/src/libc_start.c
${CMAKE_SOURCE_DIR}/libc/src/crt0.S
)
# Add the includes.
target_include_directories(${PROJECT_NAME} PUBLIC inc)
target_include_directories(libc PUBLIC inc)
# Remove the 'lib' prefix.
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
set_target_properties(libc PROPERTIES PREFIX "")
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file array.h
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file assert.h
/// @brief Defines the function and pre-processor macro for assertions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ioctls.h
/// @brief Input/Output ConTroL (IOCTL) numbers.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stat.h
/// @brief Defines the structure used by the functiosn fstat(), lstat(), and stat().
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file termios-struct.h
/// @brief Definition of the `termios` structure.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ctype.h
/// @brief Functions related to character handling.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file fcntl.h
/// @brief Headers of functions fcntl() and open().
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file fcvt.h
/// @brief Declare the functions required to turn double values into a string.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file grp.h
/// @brief Defines the structures and functions for managing groups.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ansi_colors.h
/// @brief List of ANSI colors.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file debug.h
/// @brief Debugging primitives.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file mm_io.h
/// @brief Memory Mapped IO functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file port_io.h
/// @brief Byte I/O on ports prototypes.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file libgen.h
/// @brief String routines.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "stddef.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file limits.h
/// @brief OS numeric limits.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file math.h
/// @brief Mathematical constants and functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file pwd.h
/// @brief Contains the structure and functions for managing passwords.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file readline.h
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "stddef.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ring_buffer.h
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file sched.h
/// @brief Structures and functions for managing the scheduler.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/types.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file signal.h
/// @brief Signals definition.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdarg.h
/// @brief Contains the macros required to manage variable number of arguments.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdbool.h
/// @brief Defines the boolean values.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stddef.h
/// @brief Define basic data types.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdint.h
/// @brief Standard integer data-types.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdio.h
/// @brief Standard I/0 functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdlib.h
/// @brief Useful generic functions and macros.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file strerror.h
/// @brief Contains the function that transfornms an errno into a string.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file string.h
/// @brief String routines.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file bitops.h
/// @brief Bitmasks functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file dirent.h
/// @brief Functions used to manage directories.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file errno.h
/// @brief System call errors definition.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ioctl.h
/// @brief Input/Output ConTroL (IOCTL) functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ipc.h
/// @brief Inter-Process Communication (IPC) structures.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file kernel_levels.h
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file list_head.h
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,7 +1,7 @@
/// @file list_head_algorithm.h
/// @author Enrico Fraccaroli (enry.frak@gmail.com)
/// @brief Some general algorithm that might come in handy while using list_head.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,7 +1,7 @@
/// @file mman.h
/// @author Enrico Fraccaroli (enry.frak@gmail.com)
/// @brief Functions for managing mappings in virtual address space.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file msg.h
/// @brief Definition of structure for managing message queues.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file reboot.h
/// @brief Defines the values required to issue a reboot.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file sem.h
/// @brief Definition of structure for managing semaphores.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file shm.h
/// @brief Definition of structure for managing shared memories.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stat.h
/// @brief Stat functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file types.h
/// @brief Collection of Kernel datatype
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file unistd.h
/// @brief Functions used to manage files.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file utsname.h
/// @brief Functions used to provide information about the machine & OS.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file wait.h
/// @brief Event management functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file syscall_types.h
/// @brief System Call numbers.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file termios.h
/// @brief Defines the termios functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file time.h
/// @brief Time-related functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#pragma once
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file abort.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file assert.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "assert.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ctype.c
/// @brief Functions related to character handling.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "ctype.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file fcvt.c
/// @brief Define the functions required to turn double values into a string.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "fcvt.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file grp.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "grp.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file debug.c
/// @brief Debugging primitives.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "io/debug.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file mm_io.c
/// @brief Memory Mapped IO functions implementation.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "io/mm_io.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file libc_start.c
/// @brief Contains the programs initialization procedure.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file libgen.c
/// @brief String routines.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "libgen.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file math.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "math.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file pwd.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "pwd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file sched.c
/// @brief Function for managing scheduler.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "system/syscall_types.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file setenv.c
/// @brief Defines the functions used to manipulate the environmental variables.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/errno.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdio.c
/// @brief Standard I/0 functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/errno.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file stdlib.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "stddef.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file strerror.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "strerror.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file string.c
/// @brief String routines.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "string.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file errno.c
/// @brief Stores the error number.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/errno.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ioctl.c
/// @brief Input/Output ConTroL (IOCTL) functions implementation.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/ioctl.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file ipc.c
/// @brief Inter-Process Communication (IPC) system call implementation.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/ipc.h"
+1 -1
View File
@@ -1,7 +1,7 @@
/// @file mman.c
/// @author Enrico Fraccaroli (enry.frak@gmail.com)
/// @brief Functions for managing mappings in virtual address space.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/mman.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file unistd.c
/// @brief Functions used to manage files.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file utsname.c
/// @brief Functions used to provide information about the machine & OS.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/utsname.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file termios.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "termios.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file time.c
/// @brief Clock functions.
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "time.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file chdir.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file close.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file creat.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file exec.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file exit.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file fork.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file getcwd.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file getdents.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file getgid.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/// @file getpgid.c
/// @brief
/// @copyright (c) 2014-2023 This file is distributed under the MIT License.
/// @copyright (c) 2014-2024 This file is distributed under the MIT License.
/// See LICENSE.md for details.
#include "sys/unistd.h"

Some files were not shown because too many files have changed in this diff Show More