Move all std related headers to "include_std"

This commit is contained in:
Alex 2023-04-10 06:08:58 +03:00
parent e414804445
commit 41dafe32fb
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
38 changed files with 16 additions and 42 deletions

View File

@ -4,7 +4,9 @@
"name": "Fennix x64 (Linux, GCC, debug)",
"includePath": [
"${workspaceFolder}/include",
"${workspaceFolder}/include/**"
"${workspaceFolder}/include/**",
"${workspaceFolder}/include_std",
"${workspaceFolder}/include_std/**"
],
"defines": [
"__debug_vscode__",
@ -74,7 +76,10 @@
{
"name": "Fennix x32 (Linux, GCC, debug)",
"includePath": [
"${workspaceFolder}/include/**"
"${workspaceFolder}/include",
"${workspaceFolder}/include/**",
"${workspaceFolder}/include_std",
"${workspaceFolder}/include_std/**"
],
"defines": [
"__debug_vscode__",
@ -147,7 +152,10 @@
{
"name": "Fennix Aarch64 (Linux, GCC, debug)",
"includePath": [
"${workspaceFolder}/include/**"
"${workspaceFolder}/include",
"${workspaceFolder}/include/**",
"${workspaceFolder}/include_std",
"${workspaceFolder}/include_std/**"
],
"defines": [
"__debug_vscode__",

View File

@ -31,7 +31,7 @@
bool ForceUnlock = false;
std::atomic_size_t LocksCount = 0;
size_t GetLocksCount() { return LocksCount; }
size_t GetLocksCount() { return LocksCount.load(); }
void LockClass::DeadLock(SpinLockData Lock)
{

View File

@ -22,7 +22,6 @@
#include <printf.h>
#include <lock.hpp>
#include <cwalk.h>
#include <sys.h>
#include "../kernel.h"
@ -189,9 +188,7 @@ namespace VirtualFileSystem
Node *ParentNode = nullptr;
if (FileSystemRoot->Children.size() >= 1)
{
if (FileSystemRoot->Children[0] == nullptr)
panic("Root node is null!");
assert(FileSystemRoot->Children[0] != nullptr);
ParentNode = FileSystemRoot->Children[0]; // 0 - filesystem root
}
else

View File

@ -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/*")
RS_SOURCES = $(shell find ./ -type f -name '*.rs' -not -path "./Architecture/amd64/*" -not -path "./Architecture/i386/*")
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)
STACK_USAGE_OBJ = $(C_SOURCES:.c=.su) $(CPP_SOURCES:.cpp=.su)
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
@ -56,7 +56,7 @@ WARNCFLAG = -Wall -Wextra \
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
CFLAGS := \
-I$(INCLUDE_DIR) \
$(INCLUDE_DIR) \
-DKERNEL_NAME='"$(OSNAME)"' \
-DKERNEL_VERSION='"$(KERNEL_VERSION)"' \
-DGIT_COMMIT='"$(GIT_COMMIT)"' \

View File

@ -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__