summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-02-01 05:05:00 +0100
committerLioncash <mathew1800@gmail.com>2019-02-01 05:05:15 +0100
commit414cc1eb1fdbaa0001938711665f47c940bed3c7 (patch)
treec3897dd1193d322b52aba555fcb422badee1520d /src/core/hle/kernel/kernel.cpp
parentMerge pull request #2072 from lioncash/service (diff)
downloadyuzu-414cc1eb1fdbaa0001938711665f47c940bed3c7.tar
yuzu-414cc1eb1fdbaa0001938711665f47c940bed3c7.tar.gz
yuzu-414cc1eb1fdbaa0001938711665f47c940bed3c7.tar.bz2
yuzu-414cc1eb1fdbaa0001938711665f47c940bed3c7.tar.lz
yuzu-414cc1eb1fdbaa0001938711665f47c940bed3c7.tar.xz
yuzu-414cc1eb1fdbaa0001938711665f47c940bed3c7.tar.zst
yuzu-414cc1eb1fdbaa0001938711665f47c940bed3c7.zip
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 67674cd47..7a524ce5a 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -18,7 +18,6 @@
#include "core/hle/kernel/process.h"
#include "core/hle/kernel/resource_limit.h"
#include "core/hle/kernel/thread.h"
-#include "core/hle/kernel/timer.h"
#include "core/hle/lock.h"
#include "core/hle/result.h"
@@ -86,27 +85,12 @@ static void ThreadWakeupCallback(u64 thread_handle, [[maybe_unused]] int cycles_
}
}
-/// The timer callback event, called when a timer is fired
-static void TimerCallback(u64 timer_handle, int cycles_late) {
- const auto proper_handle = static_cast<Handle>(timer_handle);
- const auto& system = Core::System::GetInstance();
- SharedPtr<Timer> timer = system.Kernel().RetrieveTimerFromCallbackHandleTable(proper_handle);
-
- if (timer == nullptr) {
- LOG_CRITICAL(Kernel, "Callback fired for invalid timer {:016X}", timer_handle);
- return;
- }
-
- timer->Signal(cycles_late);
-}
-
struct KernelCore::Impl {
void Initialize(KernelCore& kernel) {
Shutdown();
InitializeSystemResourceLimit(kernel);
InitializeThreads();
- InitializeTimers();
}
void Shutdown() {
@@ -122,9 +106,6 @@ struct KernelCore::Impl {
thread_wakeup_callback_handle_table.Clear();
thread_wakeup_event_type = nullptr;
- timer_callback_handle_table.Clear();
- timer_callback_event_type = nullptr;
-
named_ports.clear();
}
@@ -146,11 +127,6 @@ struct KernelCore::Impl {
CoreTiming::RegisterEvent("ThreadWakeupCallback", ThreadWakeupCallback);
}
- void InitializeTimers() {
- timer_callback_handle_table.Clear();
- timer_callback_event_type = CoreTiming::RegisterEvent("TimerCallback", TimerCallback);
- }
-
std::atomic<u32> next_object_id{0};
std::atomic<u64> next_process_id{Process::ProcessIDMin};
std::atomic<u64> next_thread_id{1};
@@ -161,12 +137,6 @@ struct KernelCore::Impl {
SharedPtr<ResourceLimit> system_resource_limit;
- /// The event type of the generic timer callback event
- CoreTiming::EventType* timer_callback_event_type = nullptr;
- // TODO(yuriks): This can be removed if Timer objects are explicitly pooled in the future,
- // allowing us to simply use a pool index or similar.
- Kernel::HandleTable timer_callback_handle_table;
-
CoreTiming::EventType* thread_wakeup_event_type = nullptr;
// TODO(yuriks): This can be removed if Thread objects are explicitly pooled in the future,
// allowing us to simply use a pool index or similar.
@@ -198,10 +168,6 @@ SharedPtr<Thread> KernelCore::RetrieveThreadFromWakeupCallbackHandleTable(Handle
return impl->thread_wakeup_callback_handle_table.Get<Thread>(handle);
}
-SharedPtr<Timer> KernelCore::RetrieveTimerFromCallbackHandleTable(Handle handle) const {
- return impl->timer_callback_handle_table.Get<Timer>(handle);
-}
-
void KernelCore::AppendNewProcess(SharedPtr<Process> process) {
impl->process_list.push_back(std::move(process));
}
@@ -247,18 +213,10 @@ u64 KernelCore::CreateNewProcessID() {
return impl->next_process_id++;
}
-ResultVal<Handle> KernelCore::CreateTimerCallbackHandle(const SharedPtr<Timer>& timer) {
- return impl->timer_callback_handle_table.Create(timer);
-}
-
CoreTiming::EventType* KernelCore::ThreadWakeupCallbackEventType() const {
return impl->thread_wakeup_event_type;
}
-CoreTiming::EventType* KernelCore::TimerCallbackEventType() const {
- return impl->timer_callback_event_type;
-}
-
Kernel::HandleTable& KernelCore::ThreadWakeupCallbackHandleTable() {
return impl->thread_wakeup_callback_handle_table;
}