hle: kernel: Reimplement KReadableEvent and KWritableEvent.
This commit is contained in:
parent
6bf80dfee0
commit
ff3c7c068b
38 changed files with 342 additions and 299 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "common/assert.h"
|
||||
#include "core/core.h"
|
||||
#include "core/hle/kernel/k_writable_event.h"
|
||||
#include "core/hle/kernel/k_event.h"
|
||||
#include "core/hle/service/time/standard_local_system_clock_core.h"
|
||||
#include "core/hle/service/time/standard_network_system_clock_core.h"
|
||||
#include "core/hle/service/time/standard_user_system_clock_core.h"
|
||||
|
@ -18,8 +18,10 @@ StandardUserSystemClockCore::StandardUserSystemClockCore(
|
|||
local_system_clock_core{local_system_clock_core},
|
||||
network_system_clock_core{network_system_clock_core}, auto_correction_enabled{},
|
||||
auto_correction_time{SteadyClockTimePoint::GetRandom()},
|
||||
auto_correction_event{Kernel::KWritableEvent::CreateEventPair(
|
||||
system.Kernel(), "StandardUserSystemClockCore:AutoCorrectionEvent")} {}
|
||||
auto_correction_event{Kernel::KEvent::Create(
|
||||
system.Kernel(), "StandardUserSystemClockCore:AutoCorrectionEvent")} {
|
||||
auto_correction_event->Initialize();
|
||||
}
|
||||
|
||||
ResultCode StandardUserSystemClockCore::SetAutomaticCorrectionEnabled(Core::System& system,
|
||||
bool value) {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/kernel/k_writable_event.h"
|
||||
#include "core/hle/service/time/clock_types.h"
|
||||
#include "core/hle/service/time/system_clock_core.h"
|
||||
|
||||
|
@ -12,6 +11,10 @@ namespace Core {
|
|||
class System;
|
||||
}
|
||||
|
||||
namespace Kernel {
|
||||
class KEvent;
|
||||
}
|
||||
|
||||
namespace Service::Time::Clock {
|
||||
|
||||
class StandardLocalSystemClockCore;
|
||||
|
@ -51,7 +54,7 @@ private:
|
|||
StandardNetworkSystemClockCore& network_system_clock_core;
|
||||
bool auto_correction_enabled{};
|
||||
SteadyClockTimePoint auto_correction_time;
|
||||
Kernel::EventPair auto_correction_event;
|
||||
std::shared_ptr<Kernel::KEvent> auto_correction_event;
|
||||
};
|
||||
|
||||
} // namespace Service::Time::Clock
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue