From 58e9b65f9bc3e053f612c2e085e88b6bd96523c2 Mon Sep 17 00:00:00 2001 From: magumagu Date: Fri, 13 Jun 2014 20:28:06 -0700 Subject: [PATCH] IPCHLE: clean up spelling. --- Source/Core/Core/HW/WII_IPC.cpp | 2 +- Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp | 33 +++++++++---------- Source/Core/Core/IPC_HLE/WII_IPC_HLE.h | 6 ++-- .../Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp | 2 +- .../Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp | 6 ++-- .../IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp | 2 +- .../Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp | 2 +- Source/Core/Core/IPC_HLE/WII_Socket.cpp | 2 +- 8 files changed, 26 insertions(+), 29 deletions(-) diff --git a/Source/Core/Core/HW/WII_IPC.cpp b/Source/Core/Core/HW/WII_IPC.cpp index 93ff9bbade..efbe44d770 100644 --- a/Source/Core/Core/HW/WII_IPC.cpp +++ b/Source/Core/Core/HW/WII_IPC.cpp @@ -158,7 +158,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) MMIO::ComplexWrite([](u32, u32 val) { ctrl.ppc(val); if (ctrl.X1) - WII_IPC_HLE_Interface::EnqRequest(ppc_msg); + WII_IPC_HLE_Interface::EnqueueRequest(ppc_msg); WII_IPC_HLE_Interface::Update(); CoreTiming::ScheduleEvent_Threadsafe(0, updateInterrupts, 0); }) diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp index 023840df06..b52ae01c0b 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp @@ -77,21 +77,18 @@ typedef std::deque ipc_msg_queue; static ipc_msg_queue request_queue; // ppc -> arm static ipc_msg_queue reply_queue; // arm -> ppc -static int enque_reply; -static int enque_request; +static int event_enqueue_reply; +static int event_enqueue_request; static u64 last_reply_time; -// NOTE: Only call this if you have correctly handled -// CommandAddress+0 and CommandAddress+8. -// Please search for examples of this being called elsewhere. -void EnqueReplyCallback(u64 userdata, int) +static void EnqueueReplyCallback(u64 userdata, int) { reply_queue.push_back((u32)userdata); Update(); } -void EnqueRequestCallback(u64 userdata, int) +static void EnqueueRequestCallback(u64 userdata, int) { request_queue.push_back((u32)userdata); Update(); @@ -139,14 +136,14 @@ void Init() g_DeviceMap[i] = new CWII_IPC_HLE_Device_stub(i, "/dev/usb/oh1"); i++; g_DeviceMap[i] = new IWII_IPC_HLE_Device(i, "_Unimplemented_Device_"); i++; - enque_reply = CoreTiming::RegisterEvent("IPCReply", EnqueReplyCallback); - enque_request = CoreTiming::RegisterEvent("IPCRequest", EnqueRequestCallback); + event_enqueue_reply = CoreTiming::RegisterEvent("IPCReply", EnqueueReplyCallback); + event_enqueue_request = CoreTiming::RegisterEvent("IPCRequest", EnqueueRequestCallback); } void Reset(bool _bHard) { - CoreTiming::RemoveAllEvents(enque_reply); - CoreTiming::RemoveAllEvents(enque_request); + CoreTiming::RemoveAllEvents(event_enqueue_reply); + CoreTiming::RemoveAllEvents(event_enqueue_request); for (IWII_IPC_HLE_Device*& dev : g_FdMap) { @@ -555,28 +552,28 @@ void ExecuteCommand(u32 _Address) last_reply_time = CoreTiming::GetTicks() + reply_delay; // Generate a reply to the IPC command - EnqReply(_Address, reply_delay); + EnqueueReply(_Address, reply_delay); } } // Happens AS SOON AS IPC gets a new pointer! -void EnqRequest(u32 _Address) +void EnqueueRequest(u32 address) { - CoreTiming::ScheduleEvent(1000, enque_request, _Address); + CoreTiming::ScheduleEvent(1000, event_enqueue_request, address); } // Called when IOS module has some reply // NOTE: Only call this if you have correctly handled // CommandAddress+0 and CommandAddress+8. // Please search for examples of this being called elsewhere. -void EnqReply(u32 _Address, int cycles_in_future) +void EnqueueReply(u32 address, int cycles_in_future) { - CoreTiming::ScheduleEvent(cycles_in_future, enque_reply, _Address); + CoreTiming::ScheduleEvent(cycles_in_future, event_enqueue_reply, address); } -void EnqReply_Threadsafe(u32 _Address, int cycles_in_future) +void EnqueueReply_Threadsafe(u32 address, int cycles_in_future) { - CoreTiming::ScheduleEvent_Threadsafe(cycles_in_future, enque_reply, _Address); + CoreTiming::ScheduleEvent_Threadsafe(cycles_in_future, event_enqueue_reply, address); } // This is called every IPC_HLE_PERIOD from SystemTimers.cpp diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.h index e672d7ab5b..fbb8cfb464 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.h +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.h @@ -62,8 +62,8 @@ void UpdateDevices(); void ExecuteCommand(u32 _Address); -void EnqRequest(u32 _Address); -void EnqReply(u32 _Address, int cycles_in_future = 0); -void EnqReply_Threadsafe(u32 _Address, int cycles_in_future = 0); +void EnqueueRequest(u32 address); +void EnqueueReply(u32 address, int cycles_in_future = 0); +void EnqueueReply_Threadsafe(u32 address, int cycles_in_future = 0); } // end of namespace WII_IPC_HLE_Interface diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp index c5fd2871eb..633364d68a 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp @@ -998,7 +998,7 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) Memory::Write_U32(IPC_CMD_IOCTLV, _CommandAddress + 8); // Generate a reply to the IPC command - WII_IPC_HLE_Interface::EnqReply(_CommandAddress, 0); + WII_IPC_HLE_Interface::EnqueueReply(_CommandAddress, 0); return false; } diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp index c6e20ed9b4..a1bda5250a 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp @@ -37,7 +37,7 @@ void CWII_IPC_HLE_Device_hid::checkUsbUpdates(CWII_IPC_HLE_Device_hid* hid) // Return value Memory::Write_U32(0, hid->deviceCommandAddress + 4); - WII_IPC_HLE_Interface::EnqReply_Threadsafe(hid->deviceCommandAddress); + WII_IPC_HLE_Interface::EnqueueReply_Threadsafe(hid->deviceCommandAddress); hid->deviceCommandAddress = 0; } } @@ -65,7 +65,7 @@ void CWII_IPC_HLE_Device_hid::handleUsbUpdates(struct libusb_transfer *transfer) // Return value Memory::Write_U32(ret, replyAddress + 4); - WII_IPC_HLE_Interface::EnqReply_Threadsafe(replyAddress); + WII_IPC_HLE_Interface::EnqueueReply_Threadsafe(replyAddress); //DEBUG_LOG(WII_IPC_HID, "OMG OMG OMG I GOT A CALLBACK, IMMA BE FAMOUS %d %d %d", transfer->actual_length, transfer->length, transfer->status); } @@ -249,7 +249,7 @@ bool CWII_IPC_HLE_Device_hid::IOCtl(u32 _CommandAddress) // Return value Memory::Write_U32(-1, deviceCommandAddress + 4); - WII_IPC_HLE_Interface::EnqReply(deviceCommandAddress); + WII_IPC_HLE_Interface::EnqueueReply(deviceCommandAddress); deviceCommandAddress = 0; } DEBUG_LOG(WII_IPC_HID, "HID::IOCtl(Shutdown) (BufferIn: (%08x, %i), BufferOut: (%08x, %i)", diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp index 5eb99b81cc..e096059f8b 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp @@ -22,7 +22,7 @@ void CWII_IPC_HLE_Device_sdio_slot0::EnqueueReply(u32 CommandAddress, u32 Return Memory::Write_U32(ReturnValue, CommandAddress + 4); - WII_IPC_HLE_Interface::EnqReply(CommandAddress); + WII_IPC_HLE_Interface::EnqueueReply(CommandAddress); } CWII_IPC_HLE_Device_sdio_slot0::CWII_IPC_HLE_Device_sdio_slot0(u32 _DeviceID, const std::string& _rDeviceName) diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp index de11fd600c..b4b2e81ff7 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb.cpp @@ -24,7 +24,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::EnqueueReply(u32 CommandAddress) // The original hardware overwrites the command type with the async reply type. Memory::Write_U32(IPC_REP_ASYNC, CommandAddress); - WII_IPC_HLE_Interface::EnqReply(CommandAddress); + WII_IPC_HLE_Interface::EnqueueReply(CommandAddress); } // The device class diff --git a/Source/Core/Core/IPC_HLE/WII_Socket.cpp b/Source/Core/Core/IPC_HLE/WII_Socket.cpp index a7b810be91..e32aea8015 100644 --- a/Source/Core/Core/IPC_HLE/WII_Socket.cpp +++ b/Source/Core/Core/IPC_HLE/WII_Socket.cpp @@ -632,7 +632,7 @@ void WiiSockMan::EnqueueReply(u32 CommandAddress, s32 ReturnValue, IPCCommandTyp // Return value Memory::Write_U32(ReturnValue, CommandAddress + 4); - WII_IPC_HLE_Interface::EnqReply(CommandAddress); + WII_IPC_HLE_Interface::EnqueueReply(CommandAddress); }