summaryrefslogtreecommitdiff
path: root/lib/mlibc/options/internal/riscv64-include
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mlibc/options/internal/riscv64-include')
-rw-r--r--lib/mlibc/options/internal/riscv64-include/mlibc/arch-defs.hpp12
-rw-r--r--lib/mlibc/options/internal/riscv64-include/mlibc/thread.hpp23
2 files changed, 0 insertions, 35 deletions
diff --git a/lib/mlibc/options/internal/riscv64-include/mlibc/arch-defs.hpp b/lib/mlibc/options/internal/riscv64-include/mlibc/arch-defs.hpp
deleted file mode 100644
index 0a4789f..0000000
--- a/lib/mlibc/options/internal/riscv64-include/mlibc/arch-defs.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef MLIBC_ARCH_DEFS_HPP
-#define MLIBC_ARCH_DEFS_HPP
-
-#include <stddef.h>
-
-namespace mlibc {
-
-inline constexpr size_t page_size = 0x1000;
-
-} // namespace mlibc
-
-#endif // MLIBC_ARCH_DEFS_HPP
diff --git a/lib/mlibc/options/internal/riscv64-include/mlibc/thread.hpp b/lib/mlibc/options/internal/riscv64-include/mlibc/thread.hpp
deleted file mode 100644
index 7428b75..0000000
--- a/lib/mlibc/options/internal/riscv64-include/mlibc/thread.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#pragma once
-
-#include <stdint.h>
-#include <mlibc/tcb.hpp>
-#include <bits/ensure.h>
-
-namespace mlibc {
-
-inline Tcb *get_current_tcb() {
- // On RISC-V, the TCB is below the thread pointer.
- uintptr_t tp = (uintptr_t)__builtin_thread_pointer();
- auto tcb = reinterpret_cast<Tcb *>(tp - sizeof(Tcb));
- __ensure(tcb == tcb->selfPointer);
- return tcb;
-}
-
-inline uintptr_t get_sp() {
- uintptr_t sp;
- asm ("mv %0, sp" : "=r"(sp));
- return sp;
-}
-
-} // namespace mlibc