mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Move all std related headers to "include_std"
This commit is contained in:
parent
e414804445
commit
41dafe32fb
14
.vscode/c_cpp_properties.json
vendored
14
.vscode/c_cpp_properties.json
vendored
@ -4,7 +4,9 @@
|
|||||||
"name": "Fennix x64 (Linux, GCC, debug)",
|
"name": "Fennix x64 (Linux, GCC, debug)",
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"${workspaceFolder}/include",
|
"${workspaceFolder}/include",
|
||||||
"${workspaceFolder}/include/**"
|
"${workspaceFolder}/include/**",
|
||||||
|
"${workspaceFolder}/include_std",
|
||||||
|
"${workspaceFolder}/include_std/**"
|
||||||
],
|
],
|
||||||
"defines": [
|
"defines": [
|
||||||
"__debug_vscode__",
|
"__debug_vscode__",
|
||||||
@ -74,7 +76,10 @@
|
|||||||
{
|
{
|
||||||
"name": "Fennix x32 (Linux, GCC, debug)",
|
"name": "Fennix x32 (Linux, GCC, debug)",
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"${workspaceFolder}/include/**"
|
"${workspaceFolder}/include",
|
||||||
|
"${workspaceFolder}/include/**",
|
||||||
|
"${workspaceFolder}/include_std",
|
||||||
|
"${workspaceFolder}/include_std/**"
|
||||||
],
|
],
|
||||||
"defines": [
|
"defines": [
|
||||||
"__debug_vscode__",
|
"__debug_vscode__",
|
||||||
@ -147,7 +152,10 @@
|
|||||||
{
|
{
|
||||||
"name": "Fennix Aarch64 (Linux, GCC, debug)",
|
"name": "Fennix Aarch64 (Linux, GCC, debug)",
|
||||||
"includePath": [
|
"includePath": [
|
||||||
"${workspaceFolder}/include/**"
|
"${workspaceFolder}/include",
|
||||||
|
"${workspaceFolder}/include/**",
|
||||||
|
"${workspaceFolder}/include_std",
|
||||||
|
"${workspaceFolder}/include_std/**"
|
||||||
],
|
],
|
||||||
"defines": [
|
"defines": [
|
||||||
"__debug_vscode__",
|
"__debug_vscode__",
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
bool ForceUnlock = false;
|
bool ForceUnlock = false;
|
||||||
std::atomic_size_t LocksCount = 0;
|
std::atomic_size_t LocksCount = 0;
|
||||||
|
|
||||||
size_t GetLocksCount() { return LocksCount; }
|
size_t GetLocksCount() { return LocksCount.load(); }
|
||||||
|
|
||||||
void LockClass::DeadLock(SpinLockData Lock)
|
void LockClass::DeadLock(SpinLockData Lock)
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include <printf.h>
|
#include <printf.h>
|
||||||
#include <lock.hpp>
|
#include <lock.hpp>
|
||||||
#include <cwalk.h>
|
#include <cwalk.h>
|
||||||
#include <sys.h>
|
|
||||||
|
|
||||||
#include "../kernel.h"
|
#include "../kernel.h"
|
||||||
|
|
||||||
@ -189,9 +188,7 @@ namespace VirtualFileSystem
|
|||||||
Node *ParentNode = nullptr;
|
Node *ParentNode = nullptr;
|
||||||
if (FileSystemRoot->Children.size() >= 1)
|
if (FileSystemRoot->Children.size() >= 1)
|
||||||
{
|
{
|
||||||
if (FileSystemRoot->Children[0] == nullptr)
|
assert(FileSystemRoot->Children[0] != nullptr);
|
||||||
panic("Root node is null!");
|
|
||||||
|
|
||||||
ParentNode = FileSystemRoot->Children[0]; // 0 - filesystem root
|
ParentNode = FileSystemRoot->Children[0]; // 0 - filesystem root
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
6
Makefile
6
Makefile
@ -40,11 +40,11 @@ C_SOURCES = $(shell find ./ -type f -name '*.c' -not -path "./Architecture/amd64
|
|||||||
CPP_SOURCES = $(shell find ./ -type f -name '*.cpp' -not -path "./Architecture/amd64/*" -not -path "./Architecture/i386/*")
|
CPP_SOURCES = $(shell find ./ -type f -name '*.cpp' -not -path "./Architecture/amd64/*" -not -path "./Architecture/i386/*")
|
||||||
RS_SOURCES = $(shell find ./ -type f -name '*.rs' -not -path "./Architecture/amd64/*" -not -path "./Architecture/i386/*")
|
RS_SOURCES = $(shell find ./ -type f -name '*.rs' -not -path "./Architecture/amd64/*" -not -path "./Architecture/i386/*")
|
||||||
endif
|
endif
|
||||||
HEADERS = $(sort $(dir $(wildcard ./include/*)))
|
HEADERS = $(sort $(dir $(wildcard ./include/*))) $(sort $(dir $(wildcard ./include_std/*)))
|
||||||
OBJ = $(C_SOURCES:.c=.o) $(CPP_SOURCES:.cpp=.o) $(RS_SOURCES:.rs=.o) $(ASM_SOURCES:.asm=.o) $(S_SOURCES:.S=.o) $(PSF_SOURCES:.psf=.o) $(BMP_SOURCES:.bmp=.o)
|
OBJ = $(C_SOURCES:.c=.o) $(CPP_SOURCES:.cpp=.o) $(RS_SOURCES:.rs=.o) $(ASM_SOURCES:.asm=.o) $(S_SOURCES:.S=.o) $(PSF_SOURCES:.psf=.o) $(BMP_SOURCES:.bmp=.o)
|
||||||
STACK_USAGE_OBJ = $(C_SOURCES:.c=.su) $(CPP_SOURCES:.cpp=.su)
|
STACK_USAGE_OBJ = $(C_SOURCES:.c=.su) $(CPP_SOURCES:.cpp=.su)
|
||||||
GCNO_OBJ = $(C_SOURCES:.c=.gcno) $(CPP_SOURCES:.cpp=.gcno)
|
GCNO_OBJ = $(C_SOURCES:.c=.gcno) $(CPP_SOURCES:.cpp=.gcno)
|
||||||
INCLUDE_DIR = ./include
|
INCLUDE_DIR = -I./include -I./include_std
|
||||||
|
|
||||||
LDFLAGS := -Wl,-Map kernel.map -shared -nostdlib -nodefaultlibs -nolibc
|
LDFLAGS := -Wl,-Map kernel.map -shared -nostdlib -nodefaultlibs -nolibc
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ WARNCFLAG = -Wall -Wextra \
|
|||||||
|
|
||||||
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
|
||||||
CFLAGS := \
|
CFLAGS := \
|
||||||
-I$(INCLUDE_DIR) \
|
$(INCLUDE_DIR) \
|
||||||
-DKERNEL_NAME='"$(OSNAME)"' \
|
-DKERNEL_NAME='"$(OSNAME)"' \
|
||||||
-DKERNEL_VERSION='"$(KERNEL_VERSION)"' \
|
-DKERNEL_VERSION='"$(KERNEL_VERSION)"' \
|
||||||
-DGIT_COMMIT='"$(GIT_COMMIT)"' \
|
-DGIT_COMMIT='"$(GIT_COMMIT)"' \
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is part of Fennix Kernel.
|
|
||||||
|
|
||||||
Fennix Kernel is free software: you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU General Public License as
|
|
||||||
published by the Free Software Foundation, either version 3 of
|
|
||||||
the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
Fennix Kernel is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with Fennix Kernel. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __FENNIX_KERNEL_SYSTEM_H__
|
|
||||||
#define __FENNIX_KERNEL_SYSTEM_H__
|
|
||||||
|
|
||||||
#include <types.h>
|
|
||||||
#include <cpu.hpp>
|
|
||||||
|
|
||||||
// TODO: Add actual panic screen
|
|
||||||
#define panic(msg) \
|
|
||||||
{ \
|
|
||||||
error(msg); \
|
|
||||||
CPU::Stop(); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // !__FENNIX_KERNEL_SYSTEM_H__
|
|
Loading…
x
Reference in New Issue
Block a user