diff --git a/Kernel/kernel.cpp b/Kernel/kernel.cpp index b74689da..09a6244c 100644 --- a/Kernel/kernel.cpp +++ b/Kernel/kernel.cpp @@ -247,6 +247,10 @@ EXTERNC nif cold void Main() KPrint("Initializing Filesystem"); KernelVFS(); +#ifdef DEBUG + __early_playground(); +#endif + KPrint("\x1b[1;32m################################"); TaskManager = new Tasking::Task(Tasking::IP(KernelMainThread)); TaskManager->StartScheduler(); diff --git a/Kernel/kernel_thread.cpp b/Kernel/kernel_thread.cpp index 668d6854..be496881 100644 --- a/Kernel/kernel_thread.cpp +++ b/Kernel/kernel_thread.cpp @@ -139,6 +139,10 @@ void KernelMainThread() Subsystem::Linux::InitializeSubSystem(); Subsystem::Windows::InitializeSubSystem(); +#ifdef DEBUG + __late_playground(); +#endif + KPrint("Executing %s", Config.InitPath); int ExitCode = -1; Tasking::PCB *initProc; diff --git a/Kernel/tests/playground.cpp b/Kernel/tests/playground.cpp new file mode 100644 index 00000000..9a253ac1 --- /dev/null +++ b/Kernel/tests/playground.cpp @@ -0,0 +1,30 @@ +/* + 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 . +*/ + +#ifdef DEBUG + +void __early_playground() +{ + /* test code */ +} + +void __late_playground() +{ + /* test code */ +} + +#endif // DEBUG diff --git a/Kernel/tests/t.h b/Kernel/tests/t.h index 08d4d5e6..12ac4357 100644 --- a/Kernel/tests/t.h +++ b/Kernel/tests/t.h @@ -31,6 +31,8 @@ void TreeFS(Node node, int Depth); void TaskHeartbeat(); void StressKernel(); void coroutineTest(); +void __early_playground(); +void __late_playground(); #endif // DEBUG #endif // !__FENNIX_KERNEL_non_constructor_tests_H__