summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-11-18 04:55:50 +0100
committerbunnei <bunneidev@gmail.com>2014-11-18 04:55:50 +0100
commit745b0219c5dae25d65f18ef13fd5dfd9ca23b671 (patch)
treeb9d4c36dce32830efd873ccacd25864d22f0e655 /src/core/hle/service
parentMerge pull request #192 from bunnei/fs-fix-paths (diff)
parentcore: Mark some hle functions as static (diff)
downloadyuzu-745b0219c5dae25d65f18ef13fd5dfd9ca23b671.tar
yuzu-745b0219c5dae25d65f18ef13fd5dfd9ca23b671.tar.gz
yuzu-745b0219c5dae25d65f18ef13fd5dfd9ca23b671.tar.bz2
yuzu-745b0219c5dae25d65f18ef13fd5dfd9ca23b671.tar.lz
yuzu-745b0219c5dae25d65f18ef13fd5dfd9ca23b671.tar.xz
yuzu-745b0219c5dae25d65f18ef13fd5dfd9ca23b671.tar.zst
yuzu-745b0219c5dae25d65f18ef13fd5dfd9ca23b671.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/fs_user.cpp14
-rw-r--r--src/core/hle/service/gsp_gpu.cpp16
-rw-r--r--src/core/hle/service/hid_user.cpp4
-rw-r--r--src/core/hle/service/srv.cpp6
4 files changed, 20 insertions, 20 deletions
diff --git a/src/core/hle/service/fs_user.cpp b/src/core/hle/service/fs_user.cpp
index 8d8f0a201..06d3f5656 100644
--- a/src/core/hle/service/fs_user.cpp
+++ b/src/core/hle/service/fs_user.cpp
@@ -18,7 +18,7 @@ namespace FS_User {
// puts all the sections of the http://3dbrew.org/wiki/Error_codes to something non-zero, to make
// sure we don't mislead the application into thinking something worked.
-void Initialize(Service::Interface* self) {
+static void Initialize(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
// TODO(Link Mauve): check the behavior when cmd_buff[1] isn't 32, as per
@@ -44,7 +44,7 @@ void Initialize(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 3 : File handle
*/
-void OpenFile(Service::Interface* self) {
+static void OpenFile(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
// TODO(Link Mauve): cmd_buff[2], aka archive handle lower word, isn't used according to
@@ -91,7 +91,7 @@ void OpenFile(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 3 : File handle
*/
-void OpenFileDirectly(Service::Interface* self) {
+static void OpenFileDirectly(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
auto archive_id = static_cast<FileSys::Archive::IdCode>(cmd_buff[2]);
@@ -148,7 +148,7 @@ void OpenFileDirectly(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
-void CreateDirectory(Service::Interface* self) {
+static void CreateDirectory(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
// TODO: cmd_buff[2], aka archive handle lower word, isn't used according to
@@ -177,7 +177,7 @@ void CreateDirectory(Service::Interface* self) {
DEBUG_LOG(KERNEL, "called");
}
-void OpenDirectory(Service::Interface* self) {
+static void OpenDirectory(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
// TODO(Link Mauve): cmd_buff[2], aka archive handle lower word, isn't used according to
@@ -227,7 +227,7 @@ void OpenDirectory(Service::Interface* self) {
* 2 : Archive handle lower word (unused)
* 3 : Archive handle upper word (same as file handle)
*/
-void OpenArchive(Service::Interface* self) {
+static void OpenArchive(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
auto archive_id = static_cast<FileSys::Archive::IdCode>(cmd_buff[1]);
@@ -264,7 +264,7 @@ void OpenArchive(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : Whether the Sdmc could be detected
*/
-void IsSdmcDetected(Service::Interface* self) {
+static void IsSdmcDetected(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
cmd_buff[1] = 0;
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp
index 6119e6300..66daded94 100644
--- a/src/core/hle/service/gsp_gpu.cpp
+++ b/src/core/hle/service/gsp_gpu.cpp
@@ -52,7 +52,7 @@ static inline InterruptRelayQueue* GetInterruptRelayQueue(u32 thread_id) {
sizeof(InterruptRelayQueue) * thread_id);
}
-void WriteHWRegs(u32 base_address, u32 size_in_bytes, const u32* data) {
+static void WriteHWRegs(u32 base_address, u32 size_in_bytes, const u32* data) {
// TODO: Return proper error codes
if (base_address + size_in_bytes >= 0x420000) {
ERROR_LOG(GPU, "Write address out of range! (address=0x%08x, size=0x%08x)",
@@ -76,7 +76,7 @@ void WriteHWRegs(u32 base_address, u32 size_in_bytes, const u32* data) {
}
/// Write a GSP GPU hardware register
-void WriteHWRegs(Service::Interface* self) {
+static void WriteHWRegs(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
u32 reg_addr = cmd_buff[1];
u32 size = cmd_buff[2];
@@ -87,7 +87,7 @@ void WriteHWRegs(Service::Interface* self) {
}
/// Read a GSP GPU hardware register
-void ReadHWRegs(Service::Interface* self) {
+static void ReadHWRegs(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
u32 reg_addr = cmd_buff[1];
u32 size = cmd_buff[2];
@@ -115,7 +115,7 @@ void ReadHWRegs(Service::Interface* self) {
}
}
-void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
+static void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
u32 base_address = 0x400000;
if (info.active_fb == 0) {
WriteHWRegs(base_address + 4 * GPU_REG_INDEX(framebuffer_config[screen_id].address_left1), 4, &info.address_left);
@@ -140,7 +140,7 @@ void SetBufferSwap(u32 screen_id, const FrameBufferInfo& info) {
* Outputs:
* 1: Result code
*/
-void SetBufferSwap(Service::Interface* self) {
+static void SetBufferSwap(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
u32 screen_id = cmd_buff[1];
FrameBufferInfo* fb_info = (FrameBufferInfo*)&cmd_buff[2];
@@ -159,7 +159,7 @@ void SetBufferSwap(Service::Interface* self) {
* 2 : Thread index into GSP command buffer
* 4 : Handle to GSP shared memory
*/
-void RegisterInterruptRelayQueue(Service::Interface* self) {
+static void RegisterInterruptRelayQueue(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
u32 flags = cmd_buff[1];
g_interrupt_event = cmd_buff[3];
@@ -202,7 +202,7 @@ void SignalInterrupt(InterruptId interrupt_id) {
}
/// Executes the next GSP command
-void ExecuteCommand(const Command& command, u32 thread_id) {
+static void ExecuteCommand(const Command& command, u32 thread_id) {
// Utility function to convert register ID to address
auto WriteGPURegister = [](u32 id, u32 data) {
GPU::Write<u32>(0x1EF00000 + 4 * id, data);
@@ -308,7 +308,7 @@ void ExecuteCommand(const Command& command, u32 thread_id) {
}
/// This triggers handling of the GX command written to the command buffer in shared memory.
-void TriggerCmdReqQueue(Service::Interface* self) {
+static void TriggerCmdReqQueue(Service::Interface* self) {
// Iterate through each thread's command queue...
for (unsigned thread_id = 0; thread_id < 0x4; ++thread_id) {
diff --git a/src/core/hle/service/hid_user.cpp b/src/core/hle/service/hid_user.cpp
index 0eb32ba4a..5f6bf1eff 100644
--- a/src/core/hle/service/hid_user.cpp
+++ b/src/core/hle/service/hid_user.cpp
@@ -47,7 +47,7 @@ static inline PadData* GetPadData() {
*
* Indicate the circle pad is pushed completely to the edge in 1 of 8 directions.
*/
-void UpdateNextCirclePadState() {
+static void UpdateNextCirclePadState() {
static const s16 max_value = 0x9C;
next_circle_x = next_state.circle_left ? -max_value : 0x0;
next_circle_x += next_state.circle_right ? max_value : 0x0;
@@ -155,7 +155,7 @@ void PadUpdateComplete() {
* 7 : Gyroscope event
* 8 : Event signaled by HID_User
*/
-void GetIPCHandles(Service::Interface* self) {
+static void GetIPCHandles(Service::Interface* self) {
u32* cmd_buff = Service::GetCommandBuffer();
cmd_buff[1] = 0; // No error
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp
index 6c02a43d9..420f53f8f 100644
--- a/src/core/hle/service/srv.cpp
+++ b/src/core/hle/service/srv.cpp
@@ -13,7 +13,7 @@ namespace SRV {
Handle g_event_handle = 0;
-void Initialize(Service::Interface* self) {
+static void Initialize(Service::Interface* self) {
DEBUG_LOG(OSHLE, "called");
u32* cmd_buff = Service::GetCommandBuffer();
@@ -21,7 +21,7 @@ void Initialize(Service::Interface* self) {
cmd_buff[1] = 0; // No error
}
-void GetProcSemaphore(Service::Interface* self) {
+static void GetProcSemaphore(Service::Interface* self) {
DEBUG_LOG(OSHLE, "called");
u32* cmd_buff = Service::GetCommandBuffer();
@@ -34,7 +34,7 @@ void GetProcSemaphore(Service::Interface* self) {
cmd_buff[3] = g_event_handle;
}
-void GetServiceHandle(Service::Interface* self) {
+static void GetServiceHandle(Service::Interface* self) {
Result res = 0;
u32* cmd_buff = Service::GetCommandBuffer();