summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/timer.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-30 16:02:50 +0200
committerGitHub <noreply@github.com>2018-08-30 16:02:50 +0200
commit5094dfa081c7275e35496374a42996b11f0f6005 (patch)
tree8cdfb8c270c6299a1b172fb9c14856684bedf084 /src/core/hle/kernel/timer.h
parentMerge pull request #1202 from FearlessTobi/port-3825 (diff)
parentkernel: Eliminate kernel global state (diff)
downloadyuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar
yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.gz
yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.bz2
yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.lz
yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.xz
yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.zst
yuzu-5094dfa081c7275e35496374a42996b11f0f6005.zip
Diffstat (limited to 'src/core/hle/kernel/timer.h')
-rw-r--r--src/core/hle/kernel/timer.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/hle/kernel/timer.h b/src/core/hle/kernel/timer.h
index 4dddc67e0..12915c1b1 100644
--- a/src/core/hle/kernel/timer.h
+++ b/src/core/hle/kernel/timer.h
@@ -10,15 +10,19 @@
namespace Kernel {
+class KernelCore;
+
class Timer final : public WaitObject {
public:
/**
* Creates a timer
+ * @param kernel The kernel instance to create the timer callback handle for.
* @param reset_type ResetType describing how to create the timer
* @param name Optional name of timer
* @return The created Timer
*/
- static SharedPtr<Timer> Create(ResetType reset_type, std::string name = "Unknown");
+ static SharedPtr<Timer> Create(KernelCore& kernel, ResetType reset_type,
+ std::string name = "Unknown");
std::string GetTypeName() const override {
return "Timer";
@@ -68,7 +72,7 @@ public:
void Signal(int cycles_late);
private:
- Timer();
+ explicit Timer(KernelCore& kernel);
~Timer() override;
ResetType reset_type; ///< The ResetType of this timer
@@ -83,9 +87,4 @@ private:
Handle callback_handle;
};
-/// Initializes the required variables for timers
-void TimersInit();
-/// Tears down the timer variables
-void TimersShutdown();
-
} // namespace Kernel