From fd5671b5d51289e905d43848c057f718fccb213d Mon Sep 17 00:00:00 2001 From: Jesse Buhagiar Date: Mon, 17 Oct 2022 23:05:46 +1100 Subject: [PATCH] Kernel: Add more stubs for the Thread class Slowly getting there... --- Kernel/Arch/aarch64/Dummy.cpp | 116 +++++++++++++++++++++++++++++----- 1 file changed, 101 insertions(+), 15 deletions(-) diff --git a/Kernel/Arch/aarch64/Dummy.cpp b/Kernel/Arch/aarch64/Dummy.cpp index ddd4353452..824dc3be56 100644 --- a/Kernel/Arch/aarch64/Dummy.cpp +++ b/Kernel/Arch/aarch64/Dummy.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include // Scheduler @@ -31,6 +32,25 @@ void Scheduler::timer_tick(RegisterState const&) { READONLY_AFTER_INIT Thread* g_finalizer; RecursiveSpinlock g_scheduler_lock { LockRank::None }; +void Scheduler::yield() +{ + TODO_AARCH64(); +} + +void Scheduler::notify_finalizer() +{ + TODO_AARCH64(); +} + +void Scheduler::add_time_scheduled(u64, bool) +{ + TODO_AARCH64(); +} + +void Scheduler::enqueue_runnable_thread(Kernel::Thread&) +{ + TODO_AARCH64(); +} } // Random @@ -43,21 +63,6 @@ void get_fast_random_bytes(Bytes) } -// Mutex -namespace Kernel { - -void Mutex::lock(Mode, [[maybe_unused]] LockLocation const& location) -{ - TODO_AARCH64(); -} - -void Mutex::unlock() -{ - TODO_AARCH64(); -} - -} - // Process namespace Kernel { @@ -66,6 +71,87 @@ SpinlockProtected& Process::all_instances() TODO_AARCH64(); } +bool Process::remove_thread(Kernel::Thread&) +{ + TODO_AARCH64(); +} + +void Process::finalize() +{ + TODO_AARCH64(); +} + +LockRefPtr Process::from_pid(Kernel::ProcessID) +{ + TODO_AARCH64(); +} + +} + +// Thread +namespace Kernel { + +bool Thread::JoinBlocker::unblock(void*, bool) +{ + TODO_AARCH64(); +} + +Thread::BlockTimeout::BlockTimeout(bool, const AK::Time*, const AK::Time*, clockid_t) +{ + TODO_AARCH64(); +} + +Thread::SleepBlocker::SleepBlocker(Kernel::Thread::BlockTimeout const&, AK::Time*) +{ + TODO_AARCH64(); +} + +Thread::BlockTimeout const& Thread::SleepBlocker::override_timeout(Kernel::Thread::BlockTimeout const&) +{ + TODO_AARCH64(); +} + +void Thread::SleepBlocker::will_unblock_immediately_without_blocking(UnblockImmediatelyReason) +{ +} + +void Thread::SleepBlocker::was_unblocked(bool) +{ + TODO_AARCH64(); +} + +Thread::BlockResult Thread::SleepBlocker::block_result() +{ + TODO_AARCH64(); +} + +bool Thread::Blocker::setup_blocker() +{ + TODO_AARCH64(); +} + +void Thread::Blocker::finalize() +{ +} + +Thread::Blocker::~Blocker() +{ + TODO_AARCH64(); +} + +} + +// PerformanceEventBuffer +namespace Kernel { + +bool g_profiling_all_threads = false; +PerformanceEventBuffer* g_global_perf_events = nullptr; + +ErrorOr PerformanceEventBuffer::append(int, unsigned long, unsigned long, AK::StringView, Kernel::Thread*, unsigned long, u64, ErrorOr) +{ + TODO_AARCH64(); +} + } // LockRank