cleanup: namespace Montauk (capital M) => montauk::abi

This commit is contained in:
2026-06-16 09:09:16 +02:00
parent b091af7653
commit e3dc1e881d
165 changed files with 758 additions and 758 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
// Audio handle convention:
// 0x00 - 0x07 : Mixer virtual streams (one per opened audio handle)
+1 -1
View File
@@ -12,7 +12,7 @@
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
static int64_t Sys_BtScan(BtScanResult* buf, int maxCount, uint32_t timeoutMs) {
if (!buf || maxCount <= 0) return -1;
+1 -1
View File
@@ -12,4 +12,4 @@
#pragma once
#define MONTAUK_BUILD_NUMBER 24
#define MONTAUK_BUILD_NUMBER 25
+1 -1
View File
@@ -12,7 +12,7 @@
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
static constexpr int ClipboardMaxSlots = 32;
+1 -1
View File
@@ -3,7 +3,7 @@
#include <Sched/Scheduler.hpp>
#include <Ipc/Ipc.hpp>
namespace Montauk {
namespace montauk::abi {
static Sched::Process* GetRedirTarget(Sched::Process* proc) {
if (!proc || !proc->redirected) return nullptr;
+1 -1
View File
@@ -9,7 +9,7 @@
#include "Syscall.hpp"
#include "../Sched/CrashReport.hpp"
namespace Montauk {
namespace montauk::abi {
static int64_t Sys_CrashReport(CrashReportInfo* out) {
if (!out) return 0;
+1 -1
View File
@@ -22,7 +22,7 @@
#include <Drivers/Storage/BlockDevice.hpp>
#include <Drivers/Storage/Nvme.hpp>
namespace Montauk {
namespace montauk::abi {
static void dl_strcpy(char* dst, const char* src, int max) {
int i = 0;
+1 -1
View File
@@ -17,7 +17,7 @@
#include <Ipc/Ipc.hpp>
#include "Path.hpp"
namespace Montauk {
namespace montauk::abi {
static int Sys_Open(const char* path) {
char resolved[256];
if (!ResolveProcessPath(path, resolved, sizeof(resolved))) return -1;
+1 -1
View File
@@ -16,7 +16,7 @@
#include "Common.hpp"
#include "../Libraries/flanterm/src/flanterm.h"
namespace Montauk {
namespace montauk::abi {
static void Sys_FbInfo(FbInfo* out) {
if (out == nullptr) return;
+1 -1
View File
@@ -10,7 +10,7 @@
#include <Memory/HHDM.hpp>
#include <Memory/PageFrameAllocator.hpp>
namespace Montauk {
namespace montauk::abi {
// Per-process heap allocation tracking (separate from Process struct to avoid bloating it)
struct HeapAlloc {
+1 -1
View File
@@ -10,7 +10,7 @@
#include "BuildNo.hpp"
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
static void Sys_GetInfo(SysInfo* outInfo) {
if (outInfo == nullptr) return;
+1 -1
View File
@@ -7,7 +7,7 @@
#pragma once
#include <Drivers/Input/InputEvents.hpp>
namespace Montauk {
namespace montauk::abi {
static uint64_t Sys_InputWait(uint64_t observedSerial, uint64_t timeoutMs) {
return Drivers::InputEvents::WaitForChange(observedSerial, timeoutMs);
+1 -1
View File
@@ -11,7 +11,7 @@
#include "Common.hpp"
#include "Path.hpp"
namespace Montauk {
namespace montauk::abi {
static constexpr uint32_t RedirOutputStreamCapacity = 64 * 1024;
+1 -1
View File
@@ -9,7 +9,7 @@
#include <Sched/Scheduler.hpp>
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
static int Sys_DupHandle(int handle) {
return Ipc::DupHandle(handle);
+1 -1
View File
@@ -11,7 +11,7 @@
#include "Common.hpp"
namespace Montauk {
namespace montauk::abi {
static bool Sys_IsKeyAvailable() {
auto* proc = Sched::GetCurrentProcessPtr();
if (proc && proc->redirected) {
+1 -1
View File
@@ -14,7 +14,7 @@
#include <Libraries/Memory.hpp>
#include <Libraries/String.hpp>
namespace Montauk {
namespace montauk::abi {
// Maximum libraries per process
static constexpr int MaxLibsPerProcess = 8;
+1 -1
View File
@@ -9,7 +9,7 @@
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
static void Sys_MemStats(MemStats* out) {
if (out == nullptr) return;
+1 -1
View File
@@ -9,7 +9,7 @@
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
static void Sys_MouseState(MouseState* out) {
if (out == nullptr) return;
+1 -1
View File
@@ -19,7 +19,7 @@
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
static uint16_t g_pingSeq = 0;
static constexpr uint16_t PING_ID = 0x2E01; // "ZE"
+1 -1
View File
@@ -9,7 +9,7 @@
#include <Sched/Scheduler.hpp>
#include <Libraries/Memory.hpp>
namespace Montauk {
namespace montauk::abi {
static int ParseDrivePrefix(const char* path, int* outPrefixLen = nullptr) {
if (path == nullptr || path[0] < '0' || path[0] > '9') return -1;
+1 -1
View File
@@ -15,7 +15,7 @@
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
// Pending graceful power-off request, set by the desktop and consumed by
// login.elf. Kernel-global IPC channel (one outstanding request system-wide).
+1 -1
View File
@@ -18,7 +18,7 @@
#include "WinServer.hpp"
#include "Path.hpp"
namespace Montauk {
namespace montauk::abi {
static void Sys_Exit(int exitCode) {
(void)exitCode;
Sched::ExitProcess();
+1 -1
View File
@@ -7,7 +7,7 @@
#pragma once
#include <cstdint>
namespace Montauk {
namespace montauk::abi {
// ---- Random number generation ----
// Uses RDTSC mixed with xorshift64* PRNG for entropy.
+1 -1
View File
@@ -15,7 +15,7 @@
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
static void dl_strcpy_s(char* dst, const char* src, int max) {
int i = 0;
+1 -1
View File
@@ -42,7 +42,7 @@
// Assembly entry point
extern "C" void SyscallEntry();
namespace Montauk {
namespace montauk::abi {
static constexpr uint64_t kMaxPrintableStringBytes = 4096;
static constexpr uint64_t kMaxPathBytes = 256;
+1 -1
View File
@@ -8,7 +8,7 @@
#include <cstdint>
#include <cstddef>
namespace Montauk {
namespace montauk::abi {
// Syscall numbers
+1 -1
View File
@@ -10,7 +10,7 @@
#include "Common.hpp"
namespace Montauk {
namespace montauk::abi {
static void Sys_Print(const char* text) {
auto* proc = Sched::GetCurrentProcessPtr();
+1 -1
View File
@@ -10,7 +10,7 @@
#include "Syscall.hpp"
namespace Montauk {
namespace montauk::abi {
static uint64_t Sys_GetTicks() {
return Timekeeping::GetTicks();
}
+1 -1
View File
@@ -6,7 +6,7 @@
#include <Sched/Scheduler.hpp>
#include <Memory/Paging.hpp>
namespace Montauk::UserMemory {
namespace montauk::abi::UserMemory {
static constexpr uint64_t USER_SPACE_END = 0x0000800000000000ULL;
+7 -7
View File
@@ -94,7 +94,7 @@ namespace WinServer {
ResetSlotLocked(slot);
}
static int SendEventLocked(int windowId, const Montauk::WinEvent* event) {
static int SendEventLocked(int windowId, const montauk::abi::WinEvent* event) {
if (windowId < 0 || windowId >= MaxWindows || event == nullptr) return -1;
WindowSlot& slot = g_slots[windowId];
if (!slot.used || slot.eventMailbox == nullptr) return -1;
@@ -200,7 +200,7 @@ namespace WinServer {
return 0;
}
int Poll(int windowId, int callerPid, Montauk::WinEvent* outEvent) {
int Poll(int windowId, int callerPid, montauk::abi::WinEvent* outEvent) {
WsGuard guard;
if (windowId < 0 || windowId >= MaxWindows || outEvent == nullptr) return -1;
@@ -213,13 +213,13 @@ namespace WinServer {
return rc > 0 ? 1 : 0;
}
int Enumerate(Montauk::WinInfo* outArray, int maxCount) {
int Enumerate(montauk::abi::WinInfo* outArray, int maxCount) {
WsGuard guard;
int count = 0;
for (int i = 0; i < MaxWindows && count < maxCount; i++) {
if (!g_slots[i].used) continue;
Montauk::WinInfo& info = outArray[count];
montauk::abi::WinInfo& info = outArray[count];
info.id = i;
info.ownerPid = g_slots[i].ownerPid;
for (int j = 0; j < 64; j++) info.title[j] = g_slots[i].title[j];
@@ -263,7 +263,7 @@ namespace WinServer {
return result;
}
int SendEvent(int windowId, const Montauk::WinEvent* event) {
int SendEvent(int windowId, const montauk::abi::WinEvent* event) {
WsGuard guard;
return SendEventLocked(windowId, event);
}
@@ -346,7 +346,7 @@ namespace WinServer {
WindowSlot& slot = g_slots[windowId];
if (!slot.used || slot.ownerPid != callerPid) return -1;
slot.flags = flags & Montauk::WIN_FLAG_FULLSCREEN;
slot.flags = flags & montauk::abi::WIN_FLAG_FULLSCREEN;
return 0;
}
@@ -356,7 +356,7 @@ namespace WinServer {
if (scale > 2) scale = 2;
g_uiScale = scale;
Montauk::WinEvent ev{};
montauk::abi::WinEvent ev{};
ev.type = 4;
ev.scale.scale = scale;
for (int i = 0; i < MaxWindows; i++) {
+3 -3
View File
@@ -31,11 +31,11 @@ namespace WinServer {
uint64_t& heapNext, uint64_t& outVa);
int Destroy(int windowId, int callerPid);
int Present(int windowId, int callerPid);
int Poll(int windowId, int callerPid, Montauk::WinEvent* outEvent);
int Enumerate(Montauk::WinInfo* outArray, int maxCount);
int Poll(int windowId, int callerPid, montauk::abi::WinEvent* outEvent);
int Enumerate(montauk::abi::WinInfo* outArray, int maxCount);
uint64_t Map(int windowId, int callerPid, uint64_t callerPml4, uint64_t& heapNext);
int Unmap(int windowId, int callerPid, uint64_t callerPml4);
int SendEvent(int windowId, const Montauk::WinEvent* event);
int SendEvent(int windowId, const montauk::abi::WinEvent* event);
int Resize(int windowId, int callerPid, uint64_t ownerPml4, int newW, int newH,
uint64_t& heapNext, uint64_t& outVa);
void CleanupProcess(int pid);
+1 -1
View File
@@ -12,7 +12,7 @@
#include "Syscall.hpp"
#include "WinServer.hpp"
namespace Montauk {
namespace montauk::abi {
static int Sys_WinCreate(const char* title, int w, int h, WinCreateResult* result) {
if (result == nullptr || title == nullptr) return -1;