feat: Symmetric Multiprocessing, text editor improvements, merge doom libc, implement math functions

This commit is contained in:
2026-03-23 20:09:11 +01:00
parent 937d29471b
commit 41ad1f6404
46 changed files with 3004 additions and 2404 deletions
+13
View File
@@ -13,6 +13,7 @@
#include "../Libraries/String.hpp"
#include "../Libraries/Memory.hpp"
#include <CppLib/CString.hpp>
#include <CppLib/Spinlock.hpp>
namespace Kt {
flanterm_context *ctx;
@@ -22,6 +23,11 @@ namespace Kt {
uint32_t g_kernelLogDepth = 0;
bool g_suppressKernelLog = false;
// Protects flanterm writes from concurrent CPU access.
// Mutex (not Spinlock) so interrupts stay enabled -- prevents dropped
// PS/2 mouse/keyboard bytes during log output.
kcp::Mutex g_termLock;
// 64KB ring buffer for kernel log messages
static constexpr uint64_t KLOG_BUF_SIZE = 65536;
static char g_klogBuf[KLOG_BUF_SIZE];
@@ -228,6 +234,13 @@ namespace Kt {
}
}
// Once a graphical app takes over, suppress ALL flanterm writes
// (SYS_PRINT from user processes, etc.) to avoid painting text
// over the GUI framebuffer.
if (g_suppressKernelLog && g_kernelLogDepth == 0) {
return;
}
if (c == '\n') {
flanterm_write(ctx, "\r\n", 2);
return;