summaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorGravatar Emmanuel Gil Peyrot2014-11-19 08:49:13 +0000
committerGravatar Emmanuel Gil Peyrot2014-11-19 09:03:07 +0000
commitf5d38649c7ad6fedf9db95044e3ad91ce393b8df (patch)
tree57cd232d34d8f889315331a84f0812e705d2ea88 /src/core/hle/svc.cpp
parentMerge pull request #212 from archshift/idea (diff)
downloadyuzu-f5d38649c7ad6fedf9db95044e3ad91ce393b8df.tar.gz
yuzu-f5d38649c7ad6fedf9db95044e3ad91ce393b8df.tar.xz
yuzu-f5d38649c7ad6fedf9db95044e3ad91ce393b8df.zip
Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 16a1d99b7..3a06d6765 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -1,6 +1,6 @@
1// Copyright 2014 Citra Emulator Project 1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2 2// Licensed under GPLv2
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <map> 5#include <map>
6 6
@@ -30,7 +30,7 @@ enum ControlMemoryOperation {
30 30
31/// Map application or GSP heap memory 31/// Map application or GSP heap memory
32static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) { 32static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) {
33 DEBUG_LOG(SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X", 33 DEBUG_LOG(SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X",
34 operation, addr0, addr1, size, permissions); 34 operation, addr0, addr1, size, permissions);
35 35
36 switch (operation) { 36 switch (operation) {
@@ -54,7 +54,7 @@ static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1,
54 54
55/// Maps a memory block to specified address 55/// Maps a memory block to specified address
56static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) { 56static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) {
57 DEBUG_LOG(SVC, "called memblock=0x%08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d", 57 DEBUG_LOG(SVC, "called memblock=0x%08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d",
58 handle, addr, permissions, other_permissions); 58 handle, addr, permissions, other_permissions);
59 59
60 Kernel::MemoryPermission permissions_type = static_cast<Kernel::MemoryPermission>(permissions); 60 Kernel::MemoryPermission permissions_type = static_cast<Kernel::MemoryPermission>(permissions);
@@ -63,7 +63,7 @@ static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other
63 case Kernel::MemoryPermission::Write: 63 case Kernel::MemoryPermission::Write:
64 case Kernel::MemoryPermission::ReadWrite: 64 case Kernel::MemoryPermission::ReadWrite:
65 case Kernel::MemoryPermission::DontCare: 65 case Kernel::MemoryPermission::DontCare:
66 Kernel::MapSharedMemory(handle, addr, permissions_type, 66 Kernel::MapSharedMemory(handle, addr, permissions_type,
67 static_cast<Kernel::MemoryPermission>(other_permissions)); 67 static_cast<Kernel::MemoryPermission>(other_permissions));
68 break; 68 break;
69 default: 69 default:
@@ -115,7 +115,7 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
115 115
116 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); 116 Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle);
117 117
118 DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, object->GetTypeName().c_str(), 118 DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, object->GetTypeName().c_str(),
119 object->GetName().c_str(), nano_seconds); 119 object->GetName().c_str(), nano_seconds);
120 120
121 _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!"); 121 _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!");
@@ -138,7 +138,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count,
138 bool unlock_all = true; 138 bool unlock_all = true;
139 bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated 139 bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated
140 140
141 DEBUG_LOG(SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%lld", 141 DEBUG_LOG(SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%lld",
142 handle_count, (wait_all ? "true" : "false"), nano_seconds); 142 handle_count, (wait_all ? "true" : "false"), nano_seconds);
143 143
144 // Iterate through each handle, synchronize kernel object 144 // Iterate through each handle, synchronize kernel object
@@ -149,7 +149,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count,
149 _assert_msg_(KERNEL, (object != nullptr), "called handle=0x%08X, but kernel object " 149 _assert_msg_(KERNEL, (object != nullptr), "called handle=0x%08X, but kernel object "
150 "is nullptr!", handles[i]); 150 "is nullptr!", handles[i]);
151 151
152 DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName().c_str(), 152 DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName().c_str(),
153 object->GetName().c_str()); 153 object->GetName().c_str());
154 154
155 Result res = object->WaitSynchronization(&wait); 155 Result res = object->WaitSynchronization(&wait);
@@ -183,7 +183,7 @@ static Result CreateAddressArbiter(u32* arbiter) {
183 183
184/// Arbitrate address 184/// Arbitrate address
185static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) { 185static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) {
186 return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type), address, 186 return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type), address,
187 value); 187 value);
188} 188}
189 189
@@ -195,7 +195,7 @@ static void OutputDebugString(const char* string) {
195/// Get resource limit 195/// Get resource limit
196static Result GetResourceLimit(Handle* resource_limit, Handle process) { 196static Result GetResourceLimit(Handle* resource_limit, Handle process) {
197 // With regards to proceess values: 197 // With regards to proceess values:
198 // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for 198 // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for
199 // the current KThread. 199 // the current KThread.
200 *resource_limit = 0xDEADBEEF; 200 *resource_limit = 0xDEADBEEF;
201 ERROR_LOG(SVC, "(UNIMPLEMENTED) called process=0x%08X", process); 201 ERROR_LOG(SVC, "(UNIMPLEMENTED) called process=0x%08X", process);
@@ -227,9 +227,9 @@ static Result CreateThread(u32 priority, u32 entry_point, u32 arg, u32 stack_top
227 Core::g_app_core->SetReg(1, thread); 227 Core::g_app_core->SetReg(1, thread);
228 228
229 DEBUG_LOG(SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, " 229 DEBUG_LOG(SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, "
230 "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point, 230 "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point,
231 name.c_str(), arg, stack_top, priority, processor_id, thread); 231 name.c_str(), arg, stack_top, priority, processor_id, thread);
232 232
233 return 0; 233 return 0;
234} 234}
235 235
@@ -258,7 +258,7 @@ static Result SetThreadPriority(Handle handle, s32 priority) {
258/// Create a mutex 258/// Create a mutex
259static Result CreateMutex(Handle* mutex, u32 initial_locked) { 259static Result CreateMutex(Handle* mutex, u32 initial_locked) {
260 *mutex = Kernel::CreateMutex((initial_locked != 0)); 260 *mutex = Kernel::CreateMutex((initial_locked != 0));
261 DEBUG_LOG(SVC, "called initial_locked=%s : created handle=0x%08X", 261 DEBUG_LOG(SVC, "called initial_locked=%s : created handle=0x%08X",
262 initial_locked ? "true" : "false", *mutex); 262 initial_locked ? "true" : "false", *mutex);
263 return 0; 263 return 0;
264} 264}
@@ -286,7 +286,7 @@ static Result QueryMemory(void* info, void* out, u32 addr) {
286/// Create an event 286/// Create an event
287static Result CreateEvent(Handle* evt, u32 reset_type) { 287static Result CreateEvent(Handle* evt, u32 reset_type) {
288 *evt = Kernel::CreateEvent((ResetType)reset_type); 288 *evt = Kernel::CreateEvent((ResetType)reset_type);
289 DEBUG_LOG(SVC, "called reset_type=0x%08X : created handle=0x%08X", 289 DEBUG_LOG(SVC, "called reset_type=0x%08X : created handle=0x%08X",
290 reset_type, *evt); 290 reset_type, *evt);
291 return 0; 291 return 0;
292} 292}
@@ -301,7 +301,7 @@ static Result DuplicateHandle(Handle* out, Handle handle) {
301 } 301 }
302 _assert_msg_(KERNEL, (handle != Kernel::CurrentProcess), 302 _assert_msg_(KERNEL, (handle != Kernel::CurrentProcess),
303 "(UNIMPLEMENTED) process handle duplication!"); 303 "(UNIMPLEMENTED) process handle duplication!");
304 304
305 // TODO(bunnei): FixMe - This is a hack to return the handle that we were asked to duplicate. 305 // TODO(bunnei): FixMe - This is a hack to return the handle that we were asked to duplicate.
306 *out = handle; 306 *out = handle;
307 307