From f5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:52 -0500 Subject: build: Build mlibc + add distclean target Signed-off-by: Ian Moffett --- .../internal/x86_64-include/mlibc/arch-defs.hpp | 12 ------------ .../options/internal/x86_64-include/mlibc/thread.hpp | 20 -------------------- 2 files changed, 32 deletions(-) delete mode 100644 lib/mlibc/options/internal/x86_64-include/mlibc/arch-defs.hpp delete mode 100644 lib/mlibc/options/internal/x86_64-include/mlibc/thread.hpp (limited to 'lib/mlibc/options/internal/x86_64-include') diff --git a/lib/mlibc/options/internal/x86_64-include/mlibc/arch-defs.hpp b/lib/mlibc/options/internal/x86_64-include/mlibc/arch-defs.hpp deleted file mode 100644 index 0a4789f..0000000 --- a/lib/mlibc/options/internal/x86_64-include/mlibc/arch-defs.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef MLIBC_ARCH_DEFS_HPP -#define MLIBC_ARCH_DEFS_HPP - -#include - -namespace mlibc { - -inline constexpr size_t page_size = 0x1000; - -} // namespace mlibc - -#endif // MLIBC_ARCH_DEFS_HPP diff --git a/lib/mlibc/options/internal/x86_64-include/mlibc/thread.hpp b/lib/mlibc/options/internal/x86_64-include/mlibc/thread.hpp deleted file mode 100644 index ed02b67..0000000 --- a/lib/mlibc/options/internal/x86_64-include/mlibc/thread.hpp +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include -#include - -namespace mlibc { - -inline Tcb *get_current_tcb() { - uintptr_t ptr; - asm ("movq %%fs:0, %0" : "=r"(ptr)); - return reinterpret_cast(ptr); -} - -inline uintptr_t get_sp() { - uintptr_t rsp; - asm ("mov %%rsp, %0" : "=r"(rsp)); - return rsp; -} - -} // namespace mlibc -- cgit v1.2.3