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
+4 -4
View File
@@ -35,7 +35,7 @@ namespace montauk {
// Terminate the calling thread. Never returns. If called by the main
// thread this is equivalent to exit() (the whole process exits).
[[noreturn]] inline void thread_exit(int code = 0) {
syscall1(Montauk::SYS_THREAD_EXIT, (uint64_t)code);
syscall1(montauk::abi::SYS_THREAD_EXIT, (uint64_t)code);
__builtin_unreachable();
}
@@ -86,7 +86,7 @@ namespace montauk {
ctx->stack_base = stack;
uint64_t stack_top = ((uint64_t)stack + stack_bytes) & ~0xFULL;
int tid = (int)syscall3(Montauk::SYS_THREAD_SPAWN,
int tid = (int)syscall3(montauk::abi::SYS_THREAD_SPAWN,
(uint64_t)&detail::thread_trampoline,
(uint64_t)ctx, stack_top);
if (tid < 0) {
@@ -101,13 +101,13 @@ namespace montauk {
// success (with the thread's exit code in *out_code if non-null) or
// -1 if `tid` is not a joinable sibling.
inline int thread_join(int tid, int* out_code = nullptr) {
return (int)syscall2(Montauk::SYS_THREAD_JOIN,
return (int)syscall2(montauk::abi::SYS_THREAD_JOIN,
(uint64_t)tid, (uint64_t)out_code);
}
// Return the calling thread's TID (== getpid() for the main thread).
inline int thread_self() {
return (int)syscall0(Montauk::SYS_THREAD_SELF);
return (int)syscall0(montauk::abi::SYS_THREAD_SELF);
}
// Lightweight mutex backed by a single atomic word + the kernel