yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

hle: kernel: Rename ReadableEvent to KReadableEvent.

This commit is contained in:
bunnei 2021-01-29 22:48:06 -08:00
parent b0727c90c5
commit e86a7e3691
42 changed files with 82 additions and 81 deletions

View File

@ -164,6 +164,8 @@ add_library(core STATIC
hle/kernel/k_light_lock.cpp hle/kernel/k_light_lock.cpp
hle/kernel/k_light_lock.h hle/kernel/k_light_lock.h
hle/kernel/k_priority_queue.h hle/kernel/k_priority_queue.h
hle/kernel/k_readable_event.cpp
hle/kernel/k_readable_event.h
hle/kernel/k_resource_limit.cpp hle/kernel/k_resource_limit.cpp
hle/kernel/k_resource_limit.h hle/kernel/k_resource_limit.h
hle/kernel/k_scheduler.cpp hle/kernel/k_scheduler.cpp
@ -204,8 +206,6 @@ add_library(core STATIC
hle/kernel/process.h hle/kernel/process.h
hle/kernel/process_capability.cpp hle/kernel/process_capability.cpp
hle/kernel/process_capability.h hle/kernel/process_capability.h
hle/kernel/readable_event.cpp
hle/kernel/readable_event.h
hle/kernel/server_port.cpp hle/kernel/server_port.cpp
hle/kernel/server_port.h hle/kernel/server_port.h
hle/kernel/server_session.cpp hle/kernel/server_session.cpp

View File

@ -17,13 +17,13 @@
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
#include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/handle_table.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/k_scheduler.h" #include "core/hle/kernel/k_scheduler.h"
#include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h" #include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h"
#include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_thread.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/object.h" #include "core/hle/kernel/object.h"
#include "core/hle/kernel/process.h" #include "core/hle/kernel/process.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/server_session.h" #include "core/hle/kernel/server_session.h"
#include "core/hle/kernel/time_manager.h" #include "core/hle/kernel/time_manager.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"

View File

@ -41,7 +41,7 @@ class KernelCore;
class Process; class Process;
class ServerSession; class ServerSession;
class KThread; class KThread;
class ReadableEvent; class KReadableEvent;
class WritableEvent; class WritableEvent;
enum class ThreadWakeupReason; enum class ThreadWakeupReason;

View File

@ -6,18 +6,18 @@
#include "common/assert.h" #include "common/assert.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/hle/kernel/errors.h" #include "core/hle/kernel/errors.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/k_scheduler.h" #include "core/hle/kernel/k_scheduler.h"
#include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_thread.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/object.h" #include "core/hle/kernel/object.h"
#include "core/hle/kernel/readable_event.h"
namespace Kernel { namespace Kernel {
ReadableEvent::ReadableEvent(KernelCore& kernel) : KSynchronizationObject{kernel} {} KReadableEvent::KReadableEvent(KernelCore& kernel) : KSynchronizationObject{kernel} {}
ReadableEvent::~ReadableEvent() = default; KReadableEvent::~KReadableEvent() = default;
void ReadableEvent::Signal() { void KReadableEvent::Signal() {
if (is_signaled) { if (is_signaled) {
return; return;
} }
@ -26,17 +26,17 @@ void ReadableEvent::Signal() {
NotifyAvailable(); NotifyAvailable();
} }
bool ReadableEvent::IsSignaled() const { bool KReadableEvent::IsSignaled() const {
ASSERT(kernel.GlobalSchedulerContext().IsLocked()); ASSERT(kernel.GlobalSchedulerContext().IsLocked());
return is_signaled; return is_signaled;
} }
void ReadableEvent::Clear() { void KReadableEvent::Clear() {
is_signaled = false; is_signaled = false;
} }
ResultCode ReadableEvent::Reset() { ResultCode KReadableEvent::Reset() {
KScopedSchedulerLock lock(kernel); KScopedSchedulerLock lock(kernel);
if (!is_signaled) { if (!is_signaled) {
LOG_TRACE(Kernel, "Handle is not signaled! object_id={}, object_type={}, object_name={}", LOG_TRACE(Kernel, "Handle is not signaled! object_id={}, object_type={}, object_name={}",

View File

@ -14,11 +14,11 @@ namespace Kernel {
class KernelCore; class KernelCore;
class WritableEvent; class WritableEvent;
class ReadableEvent final : public KSynchronizationObject { class KReadableEvent final : public KSynchronizationObject {
friend class WritableEvent; friend class WritableEvent;
public: public:
~ReadableEvent() override; ~KReadableEvent() override;
std::string GetTypeName() const override { std::string GetTypeName() const override {
return "ReadableEvent"; return "ReadableEvent";
@ -50,7 +50,7 @@ public:
void Finalize() override {} void Finalize() override {}
private: private:
explicit ReadableEvent(KernelCore& kernel); explicit KReadableEvent(KernelCore& kernel);
bool is_signaled{}; bool is_signaled{};
std::string name; ///< Name of event (optional) std::string name; ///< Name of event (optional)

View File

@ -26,6 +26,7 @@
#include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/handle_table.h"
#include "core/hle/kernel/k_address_arbiter.h" #include "core/hle/kernel/k_address_arbiter.h"
#include "core/hle/kernel/k_condition_variable.h" #include "core/hle/kernel/k_condition_variable.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/k_resource_limit.h" #include "core/hle/kernel/k_resource_limit.h"
#include "core/hle/kernel/k_scheduler.h" #include "core/hle/kernel/k_scheduler.h"
#include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h" #include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h"
@ -37,7 +38,6 @@
#include "core/hle/kernel/memory/page_table.h" #include "core/hle/kernel/memory/page_table.h"
#include "core/hle/kernel/physical_core.h" #include "core/hle/kernel/physical_core.h"
#include "core/hle/kernel/process.h" #include "core/hle/kernel/process.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/shared_memory.h" #include "core/hle/kernel/shared_memory.h"
#include "core/hle/kernel/svc.h" #include "core/hle/kernel/svc.h"
#include "core/hle/kernel/svc_results.h" #include "core/hle/kernel/svc_results.h"
@ -1727,7 +1727,7 @@ static ResultCode ResetSignal(Core::System& system, Handle handle) {
const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable(); const auto& handle_table = system.Kernel().CurrentProcess()->GetHandleTable();
auto event = handle_table.Get<ReadableEvent>(handle); auto event = handle_table.Get<KReadableEvent>(handle);
if (event) { if (event) {
return event->Reset(); return event->Reset();
} }
@ -1909,7 +1909,7 @@ static ResultCode ClearEvent(Core::System& system, Handle handle) {
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
auto readable_event = handle_table.Get<ReadableEvent>(handle); auto readable_event = handle_table.Get<KReadableEvent>(handle);
if (readable_event) { if (readable_event) {
readable_event->Clear(); readable_event->Clear();
return RESULT_SUCCESS; return RESULT_SUCCESS;

View File

@ -4,10 +4,10 @@
#include <algorithm> #include <algorithm>
#include "common/assert.h" #include "common/assert.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_thread.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/object.h" #include "core/hle/kernel/object.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
namespace Kernel { namespace Kernel {
@ -17,7 +17,7 @@ WritableEvent::~WritableEvent() = default;
EventPair WritableEvent::CreateEventPair(KernelCore& kernel, std::string name) { EventPair WritableEvent::CreateEventPair(KernelCore& kernel, std::string name) {
std::shared_ptr<WritableEvent> writable_event(new WritableEvent(kernel)); std::shared_ptr<WritableEvent> writable_event(new WritableEvent(kernel));
std::shared_ptr<ReadableEvent> readable_event(new ReadableEvent(kernel)); std::shared_ptr<KReadableEvent> readable_event(new KReadableEvent(kernel));
writable_event->name = name + ":Writable"; writable_event->name = name + ":Writable";
writable_event->readable = readable_event; writable_event->readable = readable_event;
@ -26,7 +26,7 @@ EventPair WritableEvent::CreateEventPair(KernelCore& kernel, std::string name) {
return {std::move(readable_event), std::move(writable_event)}; return {std::move(readable_event), std::move(writable_event)};
} }
std::shared_ptr<ReadableEvent> WritableEvent::GetReadableEvent() const { std::shared_ptr<KReadableEvent> WritableEvent::GetReadableEvent() const {
return readable; return readable;
} }

View File

@ -1,4 +1,4 @@
// Copyright 2014 Citra Emulator Project // Copyright 2021 yuzu Emulator Project
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
@ -11,11 +11,11 @@
namespace Kernel { namespace Kernel {
class KernelCore; class KernelCore;
class ReadableEvent; class KReadableEvent;
class WritableEvent; class WritableEvent;
struct EventPair { struct EventPair {
std::shared_ptr<ReadableEvent> readable; std::shared_ptr<KReadableEvent> readable;
std::shared_ptr<WritableEvent> writable; std::shared_ptr<WritableEvent> writable;
}; };
@ -42,7 +42,7 @@ public:
return HANDLE_TYPE; return HANDLE_TYPE;
} }
std::shared_ptr<ReadableEvent> GetReadableEvent() const; std::shared_ptr<KReadableEvent> GetReadableEvent() const;
void Signal(); void Signal();
void Clear(); void Clear();
@ -52,7 +52,7 @@ public:
private: private:
explicit WritableEvent(KernelCore& kernel); explicit WritableEvent(KernelCore& kernel);
std::shared_ptr<ReadableEvent> readable; std::shared_ptr<KReadableEvent> readable;
std::string name; ///< Name of event (optional) std::string name; ///< Name of event (optional)
}; };

View File

@ -13,9 +13,9 @@
#include "core/file_sys/registered_cache.h" #include "core/file_sys/registered_cache.h"
#include "core/file_sys/savedata_factory.h" #include "core/file_sys/savedata_factory.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/process.h" #include "core/hle/kernel/process.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/transfer_memory.h" #include "core/hle/kernel/transfer_memory.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/acc/profile_manager.h" #include "core/hle/service/acc/profile_manager.h"
@ -567,11 +567,11 @@ AppletMessageQueue::AppletMessageQueue(Kernel::KernelCore& kernel) {
AppletMessageQueue::~AppletMessageQueue() = default; AppletMessageQueue::~AppletMessageQueue() = default;
const std::shared_ptr<Kernel::ReadableEvent>& AppletMessageQueue::GetMessageReceiveEvent() const { const std::shared_ptr<Kernel::KReadableEvent>& AppletMessageQueue::GetMessageReceiveEvent() const {
return on_new_message.readable; return on_new_message.readable;
} }
const std::shared_ptr<Kernel::ReadableEvent>& AppletMessageQueue::GetOperationModeChangedEvent() const std::shared_ptr<Kernel::KReadableEvent>& AppletMessageQueue::GetOperationModeChangedEvent()
const { const {
return on_operation_mode_changed.readable; return on_operation_mode_changed.readable;
} }

View File

@ -55,8 +55,8 @@ public:
explicit AppletMessageQueue(Kernel::KernelCore& kernel); explicit AppletMessageQueue(Kernel::KernelCore& kernel);
~AppletMessageQueue(); ~AppletMessageQueue();
const std::shared_ptr<Kernel::ReadableEvent>& GetMessageReceiveEvent() const; const std::shared_ptr<Kernel::KReadableEvent>& GetMessageReceiveEvent() const;
const std::shared_ptr<Kernel::ReadableEvent>& GetOperationModeChangedEvent() const; const std::shared_ptr<Kernel::KReadableEvent>& GetOperationModeChangedEvent() const;
void PushMessage(AppletMessage msg); void PushMessage(AppletMessage msg);
AppletMessage PopMessage(); AppletMessage PopMessage();
std::size_t GetMessageCount() const; std::size_t GetMessageCount() const;

View File

@ -11,7 +11,7 @@
#include "core/frontend/applets/profile_select.h" #include "core/frontend/applets/profile_select.h"
#include "core/frontend/applets/software_keyboard.h" #include "core/frontend/applets/software_keyboard.h"
#include "core/frontend/applets/web_browser.h" #include "core/frontend/applets/web_browser.h"
#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/server_session.h" #include "core/hle/kernel/server_session.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/am/am.h" #include "core/hle/service/am/am.h"
@ -112,15 +112,15 @@ void AppletDataBroker::SignalStateChanged() const {
state_changed_event.writable->Signal(); state_changed_event.writable->Signal();
} }
std::shared_ptr<Kernel::ReadableEvent> AppletDataBroker::GetNormalDataEvent() const { std::shared_ptr<Kernel::KReadableEvent> AppletDataBroker::GetNormalDataEvent() const {
return pop_out_data_event.readable; return pop_out_data_event.readable;
} }
std::shared_ptr<Kernel::ReadableEvent> AppletDataBroker::GetInteractiveDataEvent() const { std::shared_ptr<Kernel::KReadableEvent> AppletDataBroker::GetInteractiveDataEvent() const {
return pop_interactive_out_data_event.readable; return pop_interactive_out_data_event.readable;
} }
std::shared_ptr<Kernel::ReadableEvent> AppletDataBroker::GetStateChangedEvent() const { std::shared_ptr<Kernel::KReadableEvent> AppletDataBroker::GetStateChangedEvent() const {
return state_changed_event.readable; return state_changed_event.readable;
} }

View File

@ -87,9 +87,9 @@ public:
void SignalStateChanged() const; void SignalStateChanged() const;
std::shared_ptr<Kernel::ReadableEvent> GetNormalDataEvent() const; std::shared_ptr<Kernel::KReadableEvent> GetNormalDataEvent() const;
std::shared_ptr<Kernel::ReadableEvent> GetInteractiveDataEvent() const; std::shared_ptr<Kernel::KReadableEvent> GetInteractiveDataEvent() const;
std::shared_ptr<Kernel::ReadableEvent> GetStateChangedEvent() const; std::shared_ptr<Kernel::KReadableEvent> GetStateChangedEvent() const;
private: private:
// Queues are named from applet's perspective // Queues are named from applet's perspective

View File

@ -14,9 +14,9 @@
#include "core/file_sys/patch_manager.h" #include "core/file_sys/patch_manager.h"
#include "core/file_sys/registered_cache.h" #include "core/file_sys/registered_cache.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/process.h" #include "core/hle/kernel/process.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/aoc/aoc_u.h" #include "core/hle/service/aoc/aoc_u.h"
#include "core/loader/loader.h" #include "core/loader/loader.h"

View File

@ -14,8 +14,8 @@
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/audio/audout_u.h" #include "core/hle/service/audio/audout_u.h"
#include "core/hle/service/audio/errors.h" #include "core/hle/service/audio/errors.h"

View File

@ -16,8 +16,8 @@
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/audio/audren_u.h" #include "core/hle/service/audio/audren_u.h"
#include "core/hle/service/audio/errors.h" #include "core/hle/service/audio/errors.h"

View File

@ -16,7 +16,7 @@ ProgressServiceBackend::ProgressServiceBackend(Kernel::KernelCore& kernel,
kernel, std::string("ProgressServiceBackend:UpdateEvent:").append(event_name)); kernel, std::string("ProgressServiceBackend:UpdateEvent:").append(event_name));
} }
std::shared_ptr<Kernel::ReadableEvent> ProgressServiceBackend::GetEvent() const { std::shared_ptr<Kernel::KReadableEvent> ProgressServiceBackend::GetEvent() const {
return event.readable; return event.readable;
} }

View File

@ -11,7 +11,7 @@
#include "common/common_types.h" #include "common/common_types.h"
#include "core/file_sys/vfs_types.h" #include "core/file_sys/vfs_types.h"
#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/result.h" #include "core/hle/result.h"
@ -98,7 +98,7 @@ public:
private: private:
explicit ProgressServiceBackend(Kernel::KernelCore& kernel, std::string_view event_name); explicit ProgressServiceBackend(Kernel::KernelCore& kernel, std::string_view event_name);
std::shared_ptr<Kernel::ReadableEvent> GetEvent() const; std::shared_ptr<Kernel::KReadableEvent> GetEvent() const;
DeliveryCacheProgressImpl& GetImpl(); DeliveryCacheProgressImpl& GetImpl();
void SignalUpdate() const; void SignalUpdate() const;

View File

@ -11,8 +11,8 @@
#include "core/core.h" #include "core/core.h"
#include "core/file_sys/vfs.h" #include "core/file_sys/vfs.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/process.h" #include "core/hle/kernel/process.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/bcat/backend/backend.h" #include "core/hle/service/bcat/backend/backend.h"
#include "core/hle/service/bcat/bcat.h" #include "core/hle/service/bcat/bcat.h"
@ -89,7 +89,7 @@ struct DeliveryCacheDirectoryEntry {
class IDeliveryCacheProgressService final : public ServiceFramework<IDeliveryCacheProgressService> { class IDeliveryCacheProgressService final : public ServiceFramework<IDeliveryCacheProgressService> {
public: public:
explicit IDeliveryCacheProgressService(Core::System& system_, explicit IDeliveryCacheProgressService(Core::System& system_,
std::shared_ptr<Kernel::ReadableEvent> event_, std::shared_ptr<Kernel::KReadableEvent> event_,
const DeliveryCacheProgressImpl& impl_) const DeliveryCacheProgressImpl& impl_)
: ServiceFramework{system_, "IDeliveryCacheProgressService"}, event{std::move(event_)}, : ServiceFramework{system_, "IDeliveryCacheProgressService"}, event{std::move(event_)},
impl{impl_} { impl{impl_} {
@ -121,7 +121,7 @@ private:
rb.Push(RESULT_SUCCESS); rb.Push(RESULT_SUCCESS);
} }
std::shared_ptr<Kernel::ReadableEvent> event; std::shared_ptr<Kernel::KReadableEvent> event;
const DeliveryCacheProgressImpl& impl; const DeliveryCacheProgressImpl& impl;
}; };

View File

@ -6,8 +6,8 @@
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/btdrv/btdrv.h" #include "core/hle/service/btdrv/btdrv.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"

View File

@ -8,8 +8,8 @@
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/hle_ipc.h" #include "core/hle/kernel/hle_ipc.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/btm/btm.h" #include "core/hle/service/btm/btm.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"

View File

@ -7,7 +7,7 @@
#include "common/uuid.h" #include "common/uuid.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/friend/errors.h" #include "core/hle/service/friend/errors.h"
#include "core/hle/service/friend/friend.h" #include "core/hle/service/friend/friend.h"

View File

@ -12,8 +12,8 @@
#include "core/core.h" #include "core/core.h"
#include "core/core_timing.h" #include "core/core_timing.h"
#include "core/frontend/input.h" #include "core/frontend/input.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/hid/controllers/npad.h" #include "core/hle/service/hid/controllers/npad.h"
#include "core/settings.h" #include "core/settings.h"
@ -872,7 +872,8 @@ bool Controller_NPad::IsVibrationDeviceMounted(const DeviceHandle& vibration_dev
return vibration_devices_mounted[npad_index][device_index]; return vibration_devices_mounted[npad_index][device_index];
} }
std::shared_ptr<Kernel::ReadableEvent> Controller_NPad::GetStyleSetChangedEvent(u32 npad_id) const { std::shared_ptr<Kernel::KReadableEvent> Controller_NPad::GetStyleSetChangedEvent(
u32 npad_id) const {
const auto& styleset_event = styleset_changed_events[NPadIdToIndex(npad_id)]; const auto& styleset_event = styleset_changed_events[NPadIdToIndex(npad_id)];
return styleset_event.readable; return styleset_event.readable;
} }

View File

@ -187,7 +187,7 @@ public:
bool IsVibrationDeviceMounted(const DeviceHandle& vibration_device_handle) const; bool IsVibrationDeviceMounted(const DeviceHandle& vibration_device_handle) const;
std::shared_ptr<Kernel::ReadableEvent> GetStyleSetChangedEvent(u32 npad_id) const; std::shared_ptr<Kernel::KReadableEvent> GetStyleSetChangedEvent(u32 npad_id) const;
void SignalStyleSetChangedEvent(u32 npad_id) const; void SignalStyleSetChangedEvent(u32 npad_id) const;
// Adds a new controller at an index. // Adds a new controller at an index.

View File

@ -14,8 +14,8 @@
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/client_port.h" #include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/client_session.h" #include "core/hle/kernel/client_session.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/shared_memory.h" #include "core/hle/kernel/shared_memory.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/hid/errors.h" #include "core/hle/service/hid/errors.h"

View File

@ -8,9 +8,9 @@
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_thread.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/lock.h" #include "core/hle/lock.h"
#include "core/hle/service/nfp/nfp.h" #include "core/hle/service/nfp/nfp.h"
@ -340,7 +340,7 @@ bool Module::Interface::LoadAmiibo(const std::vector<u8>& buffer) {
return true; return true;
} }
const std::shared_ptr<Kernel::ReadableEvent>& Module::Interface::GetNFCEvent() const { const std::shared_ptr<Kernel::KReadableEvent>& Module::Interface::GetNFCEvent() const {
return nfc_tag_load.readable; return nfc_tag_load.readable;
} }

View File

@ -6,7 +6,7 @@
#include <array> #include <array>
#include <vector> #include <vector>
#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
@ -35,7 +35,7 @@ public:
void CreateUserInterface(Kernel::HLERequestContext& ctx); void CreateUserInterface(Kernel::HLERequestContext& ctx);
bool LoadAmiibo(const std::vector<u8>& buffer); bool LoadAmiibo(const std::vector<u8>& buffer);
const std::shared_ptr<Kernel::ReadableEvent>& GetNFCEvent() const; const std::shared_ptr<Kernel::KReadableEvent>& GetNFCEvent() const;
const AmiiboFile& GetAmiiboBuffer() const; const AmiiboFile& GetAmiiboBuffer() const;
private: private:

View File

@ -4,8 +4,8 @@
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/nifm/nifm.h" #include "core/hle/service/nifm/nifm.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"

View File

@ -6,8 +6,8 @@
#include <ctime> #include <ctime>
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/nim/nim.h" #include "core/hle/service/nim/nim.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"

View File

@ -8,7 +8,7 @@
#include "common/assert.h" #include "common/assert.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/nvdrv/devices/nvhost_ctrl.h" #include "core/hle/service/nvdrv/devices/nvhost_ctrl.h"
#include "video_core/gpu.h" #include "video_core/gpu.h"

View File

@ -6,9 +6,9 @@
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_thread.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/nvdrv/interface.h" #include "core/hle/service/nvdrv/interface.h"
#include "core/hle/service/nvdrv/nvdata.h" #include "core/hle/service/nvdrv/nvdata.h"

View File

@ -7,7 +7,7 @@
#include <fmt/format.h> #include <fmt/format.h>
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/nvdrv/devices/nvdevice.h" #include "core/hle/service/nvdrv/devices/nvdevice.h"
#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h"
@ -171,7 +171,7 @@ void Module::SignalSyncpt(const u32 syncpoint_id, const u32 value) {
} }
} }
std::shared_ptr<Kernel::ReadableEvent> Module::GetEvent(const u32 event_id) const { std::shared_ptr<Kernel::KReadableEvent> Module::GetEvent(const u32 event_id) const {
return events_interface.events[event_id].event.readable; return events_interface.events[event_id].event.readable;
} }

View File

@ -132,7 +132,7 @@ public:
void SignalSyncpt(const u32 syncpoint_id, const u32 value); void SignalSyncpt(const u32 syncpoint_id, const u32 value);
std::shared_ptr<Kernel::ReadableEvent> GetEvent(u32 event_id) const; std::shared_ptr<Kernel::KReadableEvent> GetEvent(u32 event_id) const;
std::shared_ptr<Kernel::WritableEvent> GetEventWriteable(u32 event_id) const; std::shared_ptr<Kernel::WritableEvent> GetEventWriteable(u32 event_id) const;

View File

@ -7,8 +7,8 @@
#include "common/assert.h" #include "common/assert.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/nvflinger/buffer_queue.h" #include "core/hle/service/nvflinger/buffer_queue.h"
@ -192,7 +192,7 @@ std::shared_ptr<Kernel::WritableEvent> BufferQueue::GetWritableBufferWaitEvent()
return buffer_wait_event.writable; return buffer_wait_event.writable;
} }
std::shared_ptr<Kernel::ReadableEvent> BufferQueue::GetBufferWaitEvent() const { std::shared_ptr<Kernel::KReadableEvent> BufferQueue::GetBufferWaitEvent() const {
return buffer_wait_event.readable; return buffer_wait_event.readable;
} }

View File

@ -115,7 +115,7 @@ public:
std::shared_ptr<Kernel::WritableEvent> GetWritableBufferWaitEvent() const; std::shared_ptr<Kernel::WritableEvent> GetWritableBufferWaitEvent() const;
std::shared_ptr<Kernel::ReadableEvent> GetBufferWaitEvent() const; std::shared_ptr<Kernel::KReadableEvent> GetBufferWaitEvent() const;
private: private:
BufferQueue(const BufferQueue&) = delete; BufferQueue(const BufferQueue&) = delete;

View File

@ -14,8 +14,8 @@
#include "core/core_timing.h" #include "core/core_timing.h"
#include "core/core_timing_util.h" #include "core/core_timing_util.h"
#include "core/hardware_properties.h" #include "core/hardware_properties.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h" #include "core/hle/service/nvdrv/devices/nvdisp_disp0.h"
#include "core/hle/service/nvdrv/nvdrv.h" #include "core/hle/service/nvdrv/nvdrv.h"
#include "core/hle/service/nvflinger/buffer_queue.h" #include "core/hle/service/nvflinger/buffer_queue.h"
@ -165,7 +165,7 @@ std::optional<u32> NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) co
return layer->GetBufferQueue().GetId(); return layer->GetBufferQueue().GetId();
} }
std::shared_ptr<Kernel::ReadableEvent> NVFlinger::FindVsyncEvent(u64 display_id) const { std::shared_ptr<Kernel::KReadableEvent> NVFlinger::FindVsyncEvent(u64 display_id) const {
const auto guard = Lock(); const auto guard = Lock();
auto* const display = FindDisplay(display_id); auto* const display = FindDisplay(display_id);

View File

@ -26,7 +26,7 @@ struct EventType;
} // namespace Core::Timing } // namespace Core::Timing
namespace Kernel { namespace Kernel {
class ReadableEvent; class KReadableEvent;
class WritableEvent; class WritableEvent;
} // namespace Kernel } // namespace Kernel
@ -72,7 +72,7 @@ public:
/// Gets the vsync event for the specified display. /// Gets the vsync event for the specified display.
/// ///
/// If an invalid display ID is provided, then nullptr is returned. /// If an invalid display ID is provided, then nullptr is returned.
[[nodiscard]] std::shared_ptr<Kernel::ReadableEvent> FindVsyncEvent(u64 display_id) const; [[nodiscard]] std::shared_ptr<Kernel::KReadableEvent> FindVsyncEvent(u64 display_id) const;
/// Obtains a buffer queue identified by the ID. /// Obtains a buffer queue identified by the ID.
[[nodiscard]] BufferQueue* FindBufferQueue(u32 id); [[nodiscard]] BufferQueue* FindBufferQueue(u32 id);

View File

@ -7,8 +7,8 @@
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h" #include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/ptm/psm.h" #include "core/hle/service/ptm/psm.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"

View File

@ -9,7 +9,7 @@
#include "common/assert.h" #include "common/assert.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/k_readable_event.h"
#include "core/hle/service/vi/display/vi_display.h" #include "core/hle/service/vi/display/vi_display.h"
#include "core/hle/service/vi/layer/vi_layer.h" #include "core/hle/service/vi/layer/vi_layer.h"
@ -31,7 +31,7 @@ const Layer& Display::GetLayer(std::size_t index) const {
return *layers.at(index); return *layers.at(index);
} }
std::shared_ptr<Kernel::ReadableEvent> Display::GetVSyncEvent() const { std::shared_ptr<Kernel::KReadableEvent> Display::GetVSyncEvent() const {
return vsync_event.readable; return vsync_event.readable;
} }

View File

@ -58,7 +58,7 @@ public:
const Layer& GetLayer(std::size_t index) const; const Layer& GetLayer(std::size_t index) const;
/// Gets the readable vsync event. /// Gets the readable vsync event.
std::shared_ptr<Kernel::ReadableEvent> GetVSyncEvent() const; std::shared_ptr<Kernel::KReadableEvent> GetVSyncEvent() const;
/// Signals the internal vsync event. /// Signals the internal vsync event.
void SignalVSyncEvent(); void SignalVSyncEvent();

View File

@ -18,8 +18,8 @@
#include "common/swap.h" #include "common/swap.h"
#include "core/core_timing.h" #include "core/core_timing.h"
#include "core/hle/ipc_helpers.h" #include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_thread.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/writable_event.h" #include "core/hle/kernel/writable_event.h"
#include "core/hle/service/nvdrv/nvdata.h" #include "core/hle/service/nvdrv/nvdata.h"
#include "core/hle/service/nvdrv/nvdrv.h" #include "core/hle/service/nvdrv/nvdrv.h"

View File

@ -13,11 +13,11 @@
#include "core/arm/arm_interface.h" #include "core/arm/arm_interface.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/handle_table.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/k_scheduler.h" #include "core/hle/kernel/k_scheduler.h"
#include "core/hle/kernel/k_synchronization_object.h" #include "core/hle/kernel/k_synchronization_object.h"
#include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_thread.h"
#include "core/hle/kernel/process.h" #include "core/hle/kernel/process.h"
#include "core/hle/kernel/readable_event.h"
#include "core/hle/kernel/svc_common.h" #include "core/hle/kernel/svc_common.h"
#include "core/hle/kernel/svc_types.h" #include "core/hle/kernel/svc_types.h"
#include "core/memory.h" #include "core/memory.h"
@ -193,7 +193,7 @@ std::unique_ptr<WaitTreeSynchronizationObject> WaitTreeSynchronizationObject::ma
const Kernel::KSynchronizationObject& object) { const Kernel::KSynchronizationObject& object) {
switch (object.GetHandleType()) { switch (object.GetHandleType()) {
case Kernel::HandleType::ReadableEvent: case Kernel::HandleType::ReadableEvent:
return std::make_unique<WaitTreeEvent>(static_cast<const Kernel::ReadableEvent&>(object)); return std::make_unique<WaitTreeEvent>(static_cast<const Kernel::KReadableEvent&>(object));
case Kernel::HandleType::Thread: case Kernel::HandleType::Thread:
return std::make_unique<WaitTreeThread>(static_cast<const Kernel::KThread&>(object)); return std::make_unique<WaitTreeThread>(static_cast<const Kernel::KThread&>(object));
default: default:
@ -373,7 +373,7 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const {
return list; return list;
} }
WaitTreeEvent::WaitTreeEvent(const Kernel::ReadableEvent& object) WaitTreeEvent::WaitTreeEvent(const Kernel::KReadableEvent& object)
: WaitTreeSynchronizationObject(object) {} : WaitTreeSynchronizationObject(object) {}
WaitTreeEvent::~WaitTreeEvent() = default; WaitTreeEvent::~WaitTreeEvent() = default;

View File

@ -18,9 +18,9 @@ class EmuThread;
namespace Kernel { namespace Kernel {
class HandleTable; class HandleTable;
class KReadableEvent;
class KSynchronizationObject; class KSynchronizationObject;
class KThread; class KThread;
class ReadableEvent;
} // namespace Kernel } // namespace Kernel
class WaitTreeThread; class WaitTreeThread;
@ -142,7 +142,7 @@ public:
class WaitTreeEvent : public WaitTreeSynchronizationObject { class WaitTreeEvent : public WaitTreeSynchronizationObject {
Q_OBJECT Q_OBJECT
public: public:
explicit WaitTreeEvent(const Kernel::ReadableEvent& object); explicit WaitTreeEvent(const Kernel::KReadableEvent& object);
~WaitTreeEvent() override; ~WaitTreeEvent() override;
}; };