test(kernel): add debug playground functions for testing purposes

This commit is contained in:
EnderIce2 2025-05-16 17:23:41 +00:00
parent fda5ede37f
commit 2349610e47
Signed by: enderice2
GPG Key ID: FEB6B8A8507BA62E
4 changed files with 40 additions and 0 deletions

View File

@ -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();

View File

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

View File

@ -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 <https://www.gnu.org/licenses/>.
*/
#ifdef DEBUG
void __early_playground()
{
/* test code */
}
void __late_playground()
{
/* test code */
}
#endif // DEBUG

View File

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