summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2016-03-12 21:47:41 -0500
committerGravatar Lioncash2016-03-12 21:47:41 -0500
commit856a1d0386099f6311e4fb9cca345142fc22330a (patch)
tree5c06aa00ad880a09ff1c227e0ed5da0901d3ef63
parentsvc: Remove unused ArbitrationType enum (diff)
downloadyuzu-856a1d0386099f6311e4fb9cca345142fc22330a.tar.gz
yuzu-856a1d0386099f6311e4fb9cca345142fc22330a.tar.xz
yuzu-856a1d0386099f6311e4fb9cca345142fc22330a.zip
svc: Move ResetType enum to the kernel event header
-rw-r--r--src/core/hle/function_wrappers.h1
-rw-r--r--src/core/hle/kernel/event.h8
-rw-r--r--src/core/hle/kernel/timer.h2
-rw-r--r--src/core/hle/service/apt/apt.cpp4
-rw-r--r--src/core/hle/service/dsp_dsp.cpp2
-rw-r--r--src/core/hle/service/nwm_uds.cpp2
-rw-r--r--src/core/hle/service/srv.cpp2
-rw-r--r--src/core/hle/service/y2r_u.cpp2
-rw-r--r--src/core/hle/svc.cpp4
-rw-r--r--src/core/hle/svc.h6
10 files changed, 17 insertions, 16 deletions
diff --git a/src/core/hle/function_wrappers.h b/src/core/hle/function_wrappers.h
index 882a51df1..4d718b681 100644
--- a/src/core/hle/function_wrappers.h
+++ b/src/core/hle/function_wrappers.h
@@ -10,6 +10,7 @@
10#include "core/memory.h" 10#include "core/memory.h"
11#include "core/hle/hle.h" 11#include "core/hle/hle.h"
12#include "core/hle/result.h" 12#include "core/hle/result.h"
13#include "core/hle/svc.h"
13 14
14namespace HLE { 15namespace HLE {
15 16
diff --git a/src/core/hle/kernel/event.h b/src/core/hle/kernel/event.h
index 89d405236..73d0da419 100644
--- a/src/core/hle/kernel/event.h
+++ b/src/core/hle/kernel/event.h
@@ -7,10 +7,16 @@
7#include "common/common_types.h" 7#include "common/common_types.h"
8 8
9#include "core/hle/kernel/kernel.h" 9#include "core/hle/kernel/kernel.h"
10#include "core/hle/svc.h"
11 10
12namespace Kernel { 11namespace Kernel {
13 12
13enum class ResetType {
14 OneShot,
15 Sticky,
16 Pulse,
17};
18
19
14class Event final : public WaitObject { 20class Event final : public WaitObject {
15public: 21public:
16 /** 22 /**
diff --git a/src/core/hle/kernel/timer.h b/src/core/hle/kernel/timer.h
index 540e4e187..b1db60e8f 100644
--- a/src/core/hle/kernel/timer.h
+++ b/src/core/hle/kernel/timer.h
@@ -6,8 +6,8 @@
6 6
7#include "common/common_types.h" 7#include "common/common_types.h"
8 8
9#include "core/hle/kernel/event.h"
9#include "core/hle/kernel/kernel.h" 10#include "core/hle/kernel/kernel.h"
10#include "core/hle/svc.h"
11 11
12namespace Kernel { 12namespace Kernel {
13 13
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp
index 3a63b256a..a49365287 100644
--- a/src/core/hle/service/apt/apt.cpp
+++ b/src/core/hle/service/apt/apt.cpp
@@ -434,8 +434,8 @@ void Init() {
434 cpu_percent = 0; 434 cpu_percent = 0;
435 435
436 // TODO(bunnei): Check if these are created in Initialize or on APT process startup. 436 // TODO(bunnei): Check if these are created in Initialize or on APT process startup.
437 notification_event = Kernel::Event::Create(ResetType::OneShot, "APT_U:Notification"); 437 notification_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Notification");
438 parameter_event = Kernel::Event::Create(ResetType::OneShot, "APT_U:Start"); 438 parameter_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "APT_U:Start");
439 439
440 next_parameter.signal = static_cast<u32>(SignalType::AppJustStarted); 440 next_parameter.signal = static_cast<u32>(SignalType::AppJustStarted);
441 next_parameter.destination_id = 0x300; 441 next_parameter.destination_id = 0x300;
diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cpp
index a918ebb1a..08e437125 100644
--- a/src/core/hle/service/dsp_dsp.cpp
+++ b/src/core/hle/service/dsp_dsp.cpp
@@ -457,7 +457,7 @@ const Interface::FunctionInfo FunctionTable[] = {
457// Interface class 457// Interface class
458 458
459Interface::Interface() { 459Interface::Interface() {
460 semaphore_event = Kernel::Event::Create(ResetType::OneShot, "DSP_DSP::semaphore_event"); 460 semaphore_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "DSP_DSP::semaphore_event");
461 read_pipe_count = 0; 461 read_pipe_count = 0;
462 462
463 Register(FunctionTable); 463 Register(FunctionTable);
diff --git a/src/core/hle/service/nwm_uds.cpp b/src/core/hle/service/nwm_uds.cpp
index 1e1854dad..ae4640409 100644
--- a/src/core/hle/service/nwm_uds.cpp
+++ b/src/core/hle/service/nwm_uds.cpp
@@ -138,7 +138,7 @@ const Interface::FunctionInfo FunctionTable[] = {
138// Interface class 138// Interface class
139 139
140Interface::Interface() { 140Interface::Interface() {
141 handle_event = Kernel::Event::Create(ResetType::OneShot, "NWM_UDS::handle_event"); 141 handle_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "NWM_UDS::handle_event");
142 142
143 Register(FunctionTable); 143 Register(FunctionTable);
144} 144}
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp
index 4a3f3837a..aae955bf8 100644
--- a/src/core/hle/service/srv.cpp
+++ b/src/core/hle/service/srv.cpp
@@ -25,7 +25,7 @@ static void GetProcSemaphore(Service::Interface* self) {
25 u32* cmd_buff = Kernel::GetCommandBuffer(); 25 u32* cmd_buff = Kernel::GetCommandBuffer();
26 26
27 // TODO(bunnei): Change to a semaphore once these have been implemented 27 // TODO(bunnei): Change to a semaphore once these have been implemented
28 event_handle = Kernel::Event::Create(ResetType::OneShot, "SRV:Event"); 28 event_handle = Kernel::Event::Create(Kernel::ResetType::OneShot, "SRV:Event");
29 event_handle->Clear(); 29 event_handle->Clear();
30 30
31 cmd_buff[1] = 0; // No error 31 cmd_buff[1] = 0; // No error
diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp
index ebbb349ae..22f373adf 100644
--- a/src/core/hle/service/y2r_u.cpp
+++ b/src/core/hle/service/y2r_u.cpp
@@ -424,7 +424,7 @@ const Interface::FunctionInfo FunctionTable[] = {
424// Interface class 424// Interface class
425 425
426Interface::Interface() { 426Interface::Interface() {
427 completion_event = Kernel::Event::Create(ResetType::OneShot, "Y2R:Completed"); 427 completion_event = Kernel::Event::Create(Kernel::ResetType::OneShot, "Y2R:Completed");
428 std::memset(&conversion, 0, sizeof(conversion)); 428 std::memset(&conversion, 0, sizeof(conversion));
429 429
430 Register(FunctionTable); 430 Register(FunctionTable);
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 7a39b101d..ae54afb1c 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -661,7 +661,7 @@ static ResultCode QueryMemory(MemoryInfo* memory_info, PageInfo* page_info, u32
661static ResultCode CreateEvent(Handle* out_handle, u32 reset_type) { 661static ResultCode CreateEvent(Handle* out_handle, u32 reset_type) {
662 using Kernel::Event; 662 using Kernel::Event;
663 663
664 SharedPtr<Event> evt = Kernel::Event::Create(static_cast<ResetType>(reset_type)); 664 SharedPtr<Event> evt = Event::Create(static_cast<Kernel::ResetType>(reset_type));
665 CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(evt))); 665 CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(evt)));
666 666
667 LOG_TRACE(Kernel_SVC, "called reset_type=0x%08X : created handle=0x%08X", 667 LOG_TRACE(Kernel_SVC, "called reset_type=0x%08X : created handle=0x%08X",
@@ -707,7 +707,7 @@ static ResultCode ClearEvent(Handle handle) {
707static ResultCode CreateTimer(Handle* out_handle, u32 reset_type) { 707static ResultCode CreateTimer(Handle* out_handle, u32 reset_type) {
708 using Kernel::Timer; 708 using Kernel::Timer;
709 709
710 SharedPtr<Timer> timer = Timer::Create(static_cast<ResetType>(reset_type)); 710 SharedPtr<Timer> timer = Timer::Create(static_cast<Kernel::ResetType>(reset_type));
711 CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(timer))); 711 CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(timer)));
712 712
713 LOG_TRACE(Kernel_SVC, "called reset_type=0x%08X : created handle=0x%08X", 713 LOG_TRACE(Kernel_SVC, "called reset_type=0x%08X : created handle=0x%08X",
diff --git a/src/core/hle/svc.h b/src/core/hle/svc.h
index 339a788cf..818973eb6 100644
--- a/src/core/hle/svc.h
+++ b/src/core/hle/svc.h
@@ -20,12 +20,6 @@ struct PageInfo {
20 u32 flags; 20 u32 flags;
21}; 21};
22 22
23enum class ResetType {
24 OneShot,
25 Sticky,
26 Pulse,
27};
28
29//////////////////////////////////////////////////////////////////////////////////////////////////// 23////////////////////////////////////////////////////////////////////////////////////////////////////
30// Namespace SVC 24// Namespace SVC
31 25