diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/function_wrappers.h | 1 | ||||
| -rw-r--r-- | src/core/hle/kernel/event.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/event.h | 8 | ||||
| -rw-r--r-- | src/core/hle/kernel/timer.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/timer.h | 2 | ||||
| -rw-r--r-- | src/core/hle/service/apt/apt.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/cam/cam.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/dsp_dsp.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hid.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/service/ir/ir.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/nwm_uds.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/srv.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/y2r_u.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/svc.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/svc.h | 16 |
15 files changed, 30 insertions, 39 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 | ||
| 14 | namespace HLE { | 15 | namespace HLE { |
| 15 | 16 | ||
diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp index 53feebbc0..2b7c6992a 100644 --- a/src/core/hle/kernel/event.cpp +++ b/src/core/hle/kernel/event.cpp | |||
| @@ -35,7 +35,7 @@ void Event::Acquire() { | |||
| 35 | ASSERT_MSG(!ShouldWait(), "object unavailable!"); | 35 | ASSERT_MSG(!ShouldWait(), "object unavailable!"); |
| 36 | 36 | ||
| 37 | // Release the event if it's not sticky... | 37 | // Release the event if it's not sticky... |
| 38 | if (reset_type != RESETTYPE_STICKY) | 38 | if (reset_type != ResetType::Sticky) |
| 39 | signaled = false; | 39 | signaled = false; |
| 40 | } | 40 | } |
| 41 | 41 | ||
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 | ||
| 12 | namespace Kernel { | 11 | namespace Kernel { |
| 13 | 12 | ||
| 13 | enum class ResetType { | ||
| 14 | OneShot, | ||
| 15 | Sticky, | ||
| 16 | Pulse, | ||
| 17 | }; | ||
| 18 | |||
| 19 | |||
| 14 | class Event final : public WaitObject { | 20 | class Event final : public WaitObject { |
| 15 | public: | 21 | public: |
| 16 | /** | 22 | /** |
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp index ce6bbd719..b8daaeede 100644 --- a/src/core/hle/kernel/timer.cpp +++ b/src/core/hle/kernel/timer.cpp | |||
| @@ -43,7 +43,7 @@ bool Timer::ShouldWait() { | |||
| 43 | void Timer::Acquire() { | 43 | void Timer::Acquire() { |
| 44 | ASSERT_MSG( !ShouldWait(), "object unavailable!"); | 44 | ASSERT_MSG( !ShouldWait(), "object unavailable!"); |
| 45 | 45 | ||
| 46 | if (reset_type == RESETTYPE_ONESHOT) | 46 | if (reset_type == ResetType::OneShot) |
| 47 | signaled = false; | 47 | signaled = false; |
| 48 | } | 48 | } |
| 49 | 49 | ||
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 | ||
| 12 | namespace Kernel { | 12 | namespace Kernel { |
| 13 | 13 | ||
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp index 98c72fc32..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/cam/cam.cpp b/src/core/hle/service/cam/cam.cpp index 4d714037f..9df48a650 100644 --- a/src/core/hle/service/cam/cam.cpp +++ b/src/core/hle/service/cam/cam.cpp | |||
| @@ -293,10 +293,10 @@ void Init() { | |||
| 293 | AddService(new CAM_S_Interface); | 293 | AddService(new CAM_S_Interface); |
| 294 | AddService(new CAM_U_Interface); | 294 | AddService(new CAM_U_Interface); |
| 295 | 295 | ||
| 296 | completion_event_cam1 = Kernel::Event::Create(RESETTYPE_ONESHOT, "CAM_U::completion_event_cam1"); | 296 | completion_event_cam1 = Kernel::Event::Create(ResetType::OneShot, "CAM_U::completion_event_cam1"); |
| 297 | completion_event_cam2 = Kernel::Event::Create(RESETTYPE_ONESHOT, "CAM_U::completion_event_cam2"); | 297 | completion_event_cam2 = Kernel::Event::Create(ResetType::OneShot, "CAM_U::completion_event_cam2"); |
| 298 | interrupt_error_event = Kernel::Event::Create(RESETTYPE_ONESHOT, "CAM_U::interrupt_error_event"); | 298 | interrupt_error_event = Kernel::Event::Create(ResetType::OneShot, "CAM_U::interrupt_error_event"); |
| 299 | vsync_interrupt_error_event = Kernel::Event::Create(RESETTYPE_ONESHOT, "CAM_U::vsync_interrupt_error_event"); | 299 | vsync_interrupt_error_event = Kernel::Event::Create(ResetType::OneShot, "CAM_U::vsync_interrupt_error_event"); |
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | void Shutdown() { | 302 | void Shutdown() { |
diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cpp index 3ba24d466..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 | ||
| 459 | Interface::Interface() { | 459 | Interface::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/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 11d7e69a1..3015a9605 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -201,11 +201,11 @@ void Init() { | |||
| 201 | next_touch_index = 0; | 201 | next_touch_index = 0; |
| 202 | 202 | ||
| 203 | // Create event handles | 203 | // Create event handles |
| 204 | event_pad_or_touch_1 = Event::Create(RESETTYPE_ONESHOT, "HID:EventPadOrTouch1"); | 204 | event_pad_or_touch_1 = Event::Create(ResetType::OneShot, "HID:EventPadOrTouch1"); |
| 205 | event_pad_or_touch_2 = Event::Create(RESETTYPE_ONESHOT, "HID:EventPadOrTouch2"); | 205 | event_pad_or_touch_2 = Event::Create(ResetType::OneShot, "HID:EventPadOrTouch2"); |
| 206 | event_accelerometer = Event::Create(RESETTYPE_ONESHOT, "HID:EventAccelerometer"); | 206 | event_accelerometer = Event::Create(ResetType::OneShot, "HID:EventAccelerometer"); |
| 207 | event_gyroscope = Event::Create(RESETTYPE_ONESHOT, "HID:EventGyroscope"); | 207 | event_gyroscope = Event::Create(ResetType::OneShot, "HID:EventGyroscope"); |
| 208 | event_debug_pad = Event::Create(RESETTYPE_ONESHOT, "HID:EventDebugPad"); | 208 | event_debug_pad = Event::Create(ResetType::OneShot, "HID:EventDebugPad"); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | void Shutdown() { | 211 | void Shutdown() { |
diff --git a/src/core/hle/service/ir/ir.cpp b/src/core/hle/service/ir/ir.cpp index c2121cb2e..505c441c6 100644 --- a/src/core/hle/service/ir/ir.cpp +++ b/src/core/hle/service/ir/ir.cpp | |||
| @@ -99,8 +99,8 @@ void Init() { | |||
| 99 | transfer_shared_memory = nullptr; | 99 | transfer_shared_memory = nullptr; |
| 100 | 100 | ||
| 101 | // Create event handle(s) | 101 | // Create event handle(s) |
| 102 | handle_event = Event::Create(RESETTYPE_ONESHOT, "IR:HandleEvent"); | 102 | handle_event = Event::Create(ResetType::OneShot, "IR:HandleEvent"); |
| 103 | conn_status_event = Event::Create(RESETTYPE_ONESHOT, "IR:ConnectionStatusEvent"); | 103 | conn_status_event = Event::Create(ResetType::OneShot, "IR:ConnectionStatusEvent"); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | void Shutdown() { | 106 | void Shutdown() { |
diff --git a/src/core/hle/service/nwm_uds.cpp b/src/core/hle/service/nwm_uds.cpp index dc80984b2..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 | ||
| 140 | Interface::Interface() { | 140 | Interface::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 41fc3437b..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 a495441a4..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 | ||
| 426 | Interface::Interface() { | 426 | Interface::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 | |||
| 661 | static ResultCode CreateEvent(Handle* out_handle, u32 reset_type) { | 661 | static 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) { | |||
| 707 | static ResultCode CreateTimer(Handle* out_handle, u32 reset_type) { | 707 | static 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 4b9c71e06..818973eb6 100644 --- a/src/core/hle/svc.h +++ b/src/core/hle/svc.h | |||
| @@ -20,22 +20,6 @@ struct PageInfo { | |||
| 20 | u32 flags; | 20 | u32 flags; |
| 21 | }; | 21 | }; |
| 22 | 22 | ||
| 23 | enum ResetType { | ||
| 24 | RESETTYPE_ONESHOT, | ||
| 25 | RESETTYPE_STICKY, | ||
| 26 | RESETTYPE_PULSE, | ||
| 27 | RESETTYPE_MAX_BIT = (1u << 31), | ||
| 28 | }; | ||
| 29 | |||
| 30 | enum ArbitrationType { | ||
| 31 | ARBITRATIONTYPE_SIGNAL, | ||
| 32 | ARBITRATIONTYPE_WAIT_IF_LESS_THAN, | ||
| 33 | ARBITRATIONTYPE_DECREMENT_AND_WAIT_IF_LESS_THAN, | ||
| 34 | ARBITRATIONTYPE_WAIT_IF_LESS_THAN_WITH_TIMEOUT, | ||
| 35 | ARBITRATIONTYPE_DECREMENT_AND_WAIT_IF_LESS_THAN_WITH_TIMEOUT, | ||
| 36 | ARBITRATIONTYPE_MAX_BIT = (1u << 31) | ||
| 37 | }; | ||
| 38 | |||
| 39 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 23 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 40 | // Namespace SVC | 24 | // Namespace SVC |
| 41 | 25 | ||