summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2014-05-20 18:28:38 -0400
committerGravatar bunnei2014-05-20 18:28:38 -0400
commit143bba20453036f0a4bcc74dad10d99605a84732 (patch)
treee4ed8a6f74eb6533625b3196e23056a5fc529c4f /src/core
parentthread: whitespace change - fixed * and & placement (diff)
downloadyuzu-143bba20453036f0a4bcc74dad10d99605a84732.tar.gz
yuzu-143bba20453036f0a4bcc74dad10d99605a84732.tar.xz
yuzu-143bba20453036f0a4bcc74dad10d99605a84732.zip
renamed "syscall" module to "svc" (more accurate naming)
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/core.vcxproj4
-rw-r--r--src/core/core.vcxproj.filters12
-rw-r--r--src/core/hle/hle.cpp14
-rw-r--r--src/core/hle/hle.h2
-rw-r--r--src/core/hle/kernel/thread.cpp2
-rw-r--r--src/core/hle/service/service.h2
-rw-r--r--src/core/hle/svc.cpp (renamed from src/core/hle/syscall.cpp)12
-rw-r--r--src/core/hle/svc.h (renamed from src/core/hle/syscall.h)4
9 files changed, 28 insertions, 26 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index b0597db38..e006502da 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -33,7 +33,7 @@ set(SRCS core.cpp
33 hle/hle.cpp 33 hle/hle.cpp
34 hle/config_mem.cpp 34 hle/config_mem.cpp
35 hle/coprocessor.cpp 35 hle/coprocessor.cpp
36 hle/syscall.cpp 36 hle/svc.cpp
37 hle/kernel/kernel.cpp 37 hle/kernel/kernel.cpp
38 hle/kernel/thread.cpp 38 hle/kernel/thread.cpp
39 hle/service/apt.cpp 39 hle/service/apt.cpp
diff --git a/src/core/core.vcxproj b/src/core/core.vcxproj
index f077154ee..6eb58a636 100644
--- a/src/core/core.vcxproj
+++ b/src/core/core.vcxproj
@@ -175,7 +175,7 @@
175 <ClCompile Include="hle\service\hid.cpp" /> 175 <ClCompile Include="hle\service\hid.cpp" />
176 <ClCompile Include="hle\service\service.cpp" /> 176 <ClCompile Include="hle\service\service.cpp" />
177 <ClCompile Include="hle\service\srv.cpp" /> 177 <ClCompile Include="hle\service\srv.cpp" />
178 <ClCompile Include="hle\syscall.cpp" /> 178 <ClCompile Include="hle\svc.cpp" />
179 <ClCompile Include="hw\hw.cpp" /> 179 <ClCompile Include="hw\hw.cpp" />
180 <ClCompile Include="hw\lcd.cpp" /> 180 <ClCompile Include="hw\lcd.cpp" />
181 <ClCompile Include="hw\ndma.cpp" /> 181 <ClCompile Include="hw\ndma.cpp" />
@@ -223,7 +223,7 @@
223 <ClInclude Include="hle\service\hid.h" /> 223 <ClInclude Include="hle\service\hid.h" />
224 <ClInclude Include="hle\service\service.h" /> 224 <ClInclude Include="hle\service\service.h" />
225 <ClInclude Include="hle\service\srv.h" /> 225 <ClInclude Include="hle\service\srv.h" />
226 <ClInclude Include="hle\syscall.h" /> 226 <ClInclude Include="hle\svc.h" />
227 <ClInclude Include="hw\hw.h" /> 227 <ClInclude Include="hw\hw.h" />
228 <ClInclude Include="hw\lcd.h" /> 228 <ClInclude Include="hw\lcd.h" />
229 <ClInclude Include="hw\ndma.h" /> 229 <ClInclude Include="hw\ndma.h" />
diff --git a/src/core/core.vcxproj.filters b/src/core/core.vcxproj.filters
index 6aedeb54b..fc4e35edb 100644
--- a/src/core/core.vcxproj.filters
+++ b/src/core/core.vcxproj.filters
@@ -84,9 +84,6 @@
84 <ClCompile Include="hle\hle.cpp"> 84 <ClCompile Include="hle\hle.cpp">
85 <Filter>hle</Filter> 85 <Filter>hle</Filter>
86 </ClCompile> 86 </ClCompile>
87 <ClCompile Include="hle\syscall.cpp">
88 <Filter>hle</Filter>
89 </ClCompile>
90 <ClCompile Include="hle\service\service.cpp"> 87 <ClCompile Include="hle\service\service.cpp">
91 <Filter>hle\service</Filter> 88 <Filter>hle\service</Filter>
92 </ClCompile> 89 </ClCompile>
@@ -162,6 +159,9 @@
162 <ClCompile Include="hle\kernel\thread.cpp"> 159 <ClCompile Include="hle\kernel\thread.cpp">
163 <Filter>hle\kernel</Filter> 160 <Filter>hle\kernel</Filter>
164 </ClCompile> 161 </ClCompile>
162 <ClCompile Include="hle\svc.cpp">
163 <Filter>hle</Filter>
164 </ClCompile>
165 </ItemGroup> 165 </ItemGroup>
166 <ItemGroup> 166 <ItemGroup>
167 <ClInclude Include="arm\disassembler\arm_disasm.h"> 167 <ClInclude Include="arm\disassembler\arm_disasm.h">
@@ -226,9 +226,6 @@
226 <ClInclude Include="hle\service\service.h"> 226 <ClInclude Include="hle\service\service.h">
227 <Filter>hle\service</Filter> 227 <Filter>hle\service</Filter>
228 </ClInclude> 228 </ClInclude>
229 <ClInclude Include="hle\syscall.h">
230 <Filter>hle</Filter>
231 </ClInclude>
232 <ClInclude Include="hle\service\apt.h"> 229 <ClInclude Include="hle\service\apt.h">
233 <Filter>hle\service</Filter> 230 <Filter>hle\service</Filter>
234 </ClInclude> 231 </ClInclude>
@@ -289,6 +286,9 @@
289 <ClInclude Include="hle\kernel\thread.h"> 286 <ClInclude Include="hle\kernel\thread.h">
290 <Filter>hle\kernel</Filter> 287 <Filter>hle\kernel</Filter>
291 </ClInclude> 288 </ClInclude>
289 <ClInclude Include="hle\svc.h">
290 <Filter>hle</Filter>
291 </ClInclude>
292 </ItemGroup> 292 </ItemGroup>
293 <ItemGroup> 293 <ItemGroup>
294 <Text Include="CMakeLists.txt" /> 294 <Text Include="CMakeLists.txt" />
diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp
index 452384571..080c36abf 100644
--- a/src/core/hle/hle.cpp
+++ b/src/core/hle/hle.cpp
@@ -6,7 +6,7 @@
6 6
7#include "core/mem_map.h" 7#include "core/mem_map.h"
8#include "core/hle/hle.h" 8#include "core/hle/hle.h"
9#include "core/hle/syscall.h" 9#include "core/hle/svc.h"
10#include "core/hle/service/service.h" 10#include "core/hle/service/service.h"
11 11
12//////////////////////////////////////////////////////////////////////////////////////////////////// 12////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -15,17 +15,17 @@ namespace HLE {
15 15
16static std::vector<ModuleDef> g_module_db; 16static std::vector<ModuleDef> g_module_db;
17 17
18const FunctionDef* GetSyscallInfo(u32 opcode) { 18const FunctionDef* GetSVCInfo(u32 opcode) {
19 u32 func_num = opcode & 0xFFFFFF; // 8 bits 19 u32 func_num = opcode & 0xFFFFFF; // 8 bits
20 if (func_num > 0xFF) { 20 if (func_num > 0xFF) {
21 ERROR_LOG(HLE,"Unknown syscall: 0x%02X", func_num); 21 ERROR_LOG(HLE,"Unknown SVC: 0x%02X", func_num);
22 return NULL; 22 return NULL;
23 } 23 }
24 return &g_module_db[0].func_table[func_num]; 24 return &g_module_db[0].func_table[func_num];
25} 25}
26 26
27void CallSyscall(u32 opcode) { 27void CallSVC(u32 opcode) {
28 const FunctionDef *info = GetSyscallInfo(opcode); 28 const FunctionDef *info = GetSVCInfo(opcode);
29 29
30 if (!info) { 30 if (!info) {
31 return; 31 return;
@@ -33,7 +33,7 @@ void CallSyscall(u32 opcode) {
33 if (info->func) { 33 if (info->func) {
34 info->func(); 34 info->func();
35 } else { 35 } else {
36 ERROR_LOG(HLE, "Unimplemented SysCall function %s(..)", info->name.c_str()); 36 ERROR_LOG(HLE, "Unimplemented SVC function %s(..)", info->name.c_str());
37 } 37 }
38} 38}
39 39
@@ -54,7 +54,7 @@ void RegisterModule(std::string name, int num_functions, const FunctionDef* func
54} 54}
55 55
56void RegisterAllModules() { 56void RegisterAllModules() {
57 Syscall::Register(); 57 SVC::Register();
58} 58}
59 59
60void Init() { 60void Init() {
diff --git a/src/core/hle/hle.h b/src/core/hle/hle.h
index 452546e1f..c075147c3 100644
--- a/src/core/hle/hle.h
+++ b/src/core/hle/hle.h
@@ -34,7 +34,7 @@ struct ModuleDef {
34 34
35void RegisterModule(std::string name, int num_functions, const FunctionDef *func_table); 35void RegisterModule(std::string name, int num_functions, const FunctionDef *func_table);
36 36
37void CallSyscall(u32 opcode); 37void CallSVC(u32 opcode);
38 38
39void EatCycles(u32 cycles); 39void EatCycles(u32 cycles);
40 40
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index cfc5327a3..136fff021 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -15,7 +15,7 @@
15#include "core/core.h" 15#include "core/core.h"
16#include "core/mem_map.h" 16#include "core/mem_map.h"
17#include "core/hle/hle.h" 17#include "core/hle/hle.h"
18#include "core/hle/syscall.h" 18#include "core/hle/svc.h"
19#include "core/hle/kernel/kernel.h" 19#include "core/hle/kernel/kernel.h"
20#include "core/hle/kernel/thread.h" 20#include "core/hle/kernel/thread.h"
21 21
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index f334dbcb8..eba730efb 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -14,7 +14,7 @@
14#include "core/mem_map.h" 14#include "core/mem_map.h"
15 15
16#include "core/hle/kernel/kernel.h" 16#include "core/hle/kernel/kernel.h"
17#include "core/hle/syscall.h" 17#include "core/hle/svc.h"
18 18
19//////////////////////////////////////////////////////////////////////////////////////////////////// 19////////////////////////////////////////////////////////////////////////////////////////////////////
20// Namespace Service 20// Namespace Service
diff --git a/src/core/hle/syscall.cpp b/src/core/hle/svc.cpp
index 9a1235246..a9141699c 100644
--- a/src/core/hle/syscall.cpp
+++ b/src/core/hle/svc.cpp
@@ -13,14 +13,14 @@
13#include "core/hle/kernel/thread.h" 13#include "core/hle/kernel/thread.h"
14 14
15#include "core/hle/function_wrappers.h" 15#include "core/hle/function_wrappers.h"
16#include "core/hle/syscall.h" 16#include "core/hle/svc.h"
17#include "core/hle/service/service.h" 17#include "core/hle/service/service.h"
18#include "core/hle/kernel/thread.h" 18#include "core/hle/kernel/thread.h"
19 19
20//////////////////////////////////////////////////////////////////////////////////////////////////// 20////////////////////////////////////////////////////////////////////////////////////////////////////
21// Namespace Syscall 21// Namespace SVC
22 22
23namespace Syscall { 23namespace SVC {
24 24
25enum ControlMemoryOperation { 25enum ControlMemoryOperation {
26 MEMORY_OPERATION_HEAP = 0x00000003, 26 MEMORY_OPERATION_HEAP = 0x00000003,
@@ -123,6 +123,8 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa
123 for (u32 i = 0; i < handle_count; i++) { 123 for (u32 i = 0; i < handle_count; i++) {
124 DEBUG_LOG(SVC, "\thandle[%d]=0x%08X", i, handles[i]); 124 DEBUG_LOG(SVC, "\thandle[%d]=0x%08X", i, handles[i]);
125 } 125 }
126 __KernelReschedule("WaitSynchronizationN");
127
126 return 0; 128 return 0;
127} 129}
128 130
@@ -212,7 +214,7 @@ Result CreateEvent(void* _event, u32 reset_type) {
212 return 0; 214 return 0;
213} 215}
214 216
215const HLE::FunctionDef Syscall_Table[] = { 217const HLE::FunctionDef SVC_Table[] = {
216 {0x00, NULL, "Unknown"}, 218 {0x00, NULL, "Unknown"},
217 {0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"}, 219 {0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"},
218 {0x02, WrapI_VVU<QueryMemory>, "QueryMemory"}, 220 {0x02, WrapI_VVU<QueryMemory>, "QueryMemory"},
@@ -342,7 +344,7 @@ const HLE::FunctionDef Syscall_Table[] = {
342}; 344};
343 345
344void Register() { 346void Register() {
345 HLE::RegisterModule("SyscallTable", ARRAY_SIZE(Syscall_Table), Syscall_Table); 347 HLE::RegisterModule("SVC_Table", ARRAY_SIZE(SVC_Table), SVC_Table);
346} 348}
347 349
348} // namespace 350} // namespace
diff --git a/src/core/hle/syscall.h b/src/core/hle/svc.h
index 3da349ed5..5c35977d1 100644
--- a/src/core/hle/syscall.h
+++ b/src/core/hle/svc.h
@@ -39,9 +39,9 @@ enum ResetType {
39}; 39};
40 40
41//////////////////////////////////////////////////////////////////////////////////////////////////// 41////////////////////////////////////////////////////////////////////////////////////////////////////
42// Namespace Syscall 42// Namespace SVC
43 43
44namespace Syscall { 44namespace SVC {
45 45
46void Register(); 46void Register();
47 47