diff --git a/include/syscall/linux/defs.hpp b/subsystem/linux/include/defs.hpp similarity index 100% rename from include/syscall/linux/defs.hpp rename to subsystem/linux/include/defs.hpp diff --git a/include/syscall/linux/errno.h b/subsystem/linux/include/errno.h similarity index 100% rename from include/syscall/linux/errno.h rename to subsystem/linux/include/errno.h diff --git a/include/syscall/linux/signals.hpp b/subsystem/linux/include/signals.hpp similarity index 98% rename from include/syscall/linux/signals.hpp rename to subsystem/linux/include/signals.hpp index 623f0042..39acab1d 100644 --- a/include/syscall/linux/signals.hpp +++ b/subsystem/linux/include/signals.hpp @@ -18,8 +18,6 @@ #ifndef __FENNIX_KERNEL_LINUX_SIGNALS_H__ #define __FENNIX_KERNEL_LINUX_SIGNALS_H__ -#include - #define linux_NSIG 64 #define linux_SIGHUP 1 @@ -57,6 +55,7 @@ #define linux_SIGRTMIN 32 #define linux_SIGRTMAX linux_NSIG + struct k_sigaction { void (*handler)(int); diff --git a/include/syscall/linux/syscalls_amd64.hpp b/subsystem/linux/include/syscalls_amd64.hpp similarity index 99% rename from include/syscall/linux/syscalls_amd64.hpp rename to subsystem/linux/include/syscalls_amd64.hpp index 0c3676dc..61b0549f 100644 --- a/include/syscall/linux/syscalls_amd64.hpp +++ b/subsystem/linux/include/syscalls_amd64.hpp @@ -18,8 +18,6 @@ #ifndef __FENNIX_KERNEL_LINUX_SYSCALLS_x64_H__ #define __FENNIX_KERNEL_LINUX_SYSCALLS_x64_H__ -#include - #define __NR_amd64_read 0 #define __NR_amd64_write 1 #define __NR_amd64_open 2 diff --git a/include/syscall/linux/syscalls_i386.hpp b/subsystem/linux/include/syscalls_i386.hpp similarity index 100% rename from include/syscall/linux/syscalls_i386.hpp rename to subsystem/linux/include/syscalls_i386.hpp diff --git a/subsystem/linux/rootfs.cpp b/subsystem/linux/rootfs.cpp new file mode 100644 index 00000000..dccc67c9 --- /dev/null +++ b/subsystem/linux/rootfs.cpp @@ -0,0 +1,18 @@ +/* + 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 . +*/ + +#include "../../kernel.h" diff --git a/syscalls/linux.cpp b/subsystem/linux/syscall.cpp similarity index 99% rename from syscalls/linux.cpp rename to subsystem/linux/syscall.cpp index 918ff0d4..d52512f7 100644 --- a/syscalls/linux.cpp +++ b/subsystem/linux/syscall.cpp @@ -15,11 +15,6 @@ along with Fennix Kernel. If not, see . */ -#include -#include -#include -#include -#include #include #include @@ -38,7 +33,13 @@ #define INI_IMPLEMENTATION #include -#include "../kernel.h" +#include "include/syscalls_amd64.hpp" +#include "include/syscalls_i386.hpp" +#include "include/signals.hpp" +#include "include/defs.hpp" +#include "include/errno.h" + +#include "../../kernel.h" using Tasking::PCB; using Tasking::TCB; diff --git a/subsystem/windows/rootfs.cpp b/subsystem/windows/rootfs.cpp new file mode 100644 index 00000000..dccc67c9 --- /dev/null +++ b/subsystem/windows/rootfs.cpp @@ -0,0 +1,18 @@ +/* + 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 . +*/ + +#include "../../kernel.h" diff --git a/syscalls/linux/.gitkeep b/syscalls/linux/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/syscalls/native/.gitkeep b/syscalls/native/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/tasking/signal.cpp b/tasking/signal.cpp index c3b0e9d1..248822ea 100644 --- a/tasking/signal.cpp +++ b/tasking/signal.cpp @@ -193,7 +193,7 @@ SignalDispositions GetDefaultSignalDisposition(Signals sig) return SIG_TERM; } -/* syscalls/linux.cpp */ +/* subsystem/linux/syscall.cpp */ extern int ConvertSignalToLinux(Signals sig); namespace Tasking