diff options
| author | 2014-06-06 00:35:49 -0400 | |
|---|---|---|
| committer | 2014-06-13 09:51:13 -0400 | |
| commit | c95972275e276abe3afcac79d956ea29a0879c8e (patch) | |
| tree | f902b895aa25142f94001674baedfdac9794d548 /src/core/hle/svc.cpp | |
| parent | Kernel: Updated various kernel function "name" arguments to be const references. (diff) | |
| download | yuzu-c95972275e276abe3afcac79d956ea29a0879c8e.tar.gz yuzu-c95972275e276abe3afcac79d956ea29a0879c8e.tar.xz yuzu-c95972275e276abe3afcac79d956ea29a0879c8e.zip | |
HLE: Updated all uses of NULL to nullptr (to be C++11 compliant)
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 214 |
1 files changed, 107 insertions, 107 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index c389bbaac..01fc056a1 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -81,7 +81,7 @@ Result ConnectToPort(void* _out, const char* port_name) { | |||
| 81 | Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); | 81 | Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); |
| 82 | 82 | ||
| 83 | DEBUG_LOG(SVC, "called port_name=%s", port_name); | 83 | DEBUG_LOG(SVC, "called port_name=%s", port_name); |
| 84 | _assert_msg_(KERNEL, (service != NULL), "called, but service is not implemented!"); | 84 | _assert_msg_(KERNEL, (service != nullptr), "called, but service is not implemented!"); |
| 85 | 85 | ||
| 86 | *out = service->GetHandle(); | 86 | *out = service->GetHandle(); |
| 87 | 87 | ||
| @@ -93,7 +93,7 @@ Result SendSyncRequest(Handle handle) { | |||
| 93 | bool wait = false; | 93 | bool wait = false; |
| 94 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); | 94 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); |
| 95 | 95 | ||
| 96 | _assert_msg_(KERNEL, (object != NULL), "called, but kernel object is NULL!"); | 96 | _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!"); |
| 97 | DEBUG_LOG(SVC, "called handle=0x%08X(%s)", handle, object->GetTypeName()); | 97 | DEBUG_LOG(SVC, "called handle=0x%08X(%s)", handle, object->GetTypeName()); |
| 98 | 98 | ||
| 99 | Result res = object->SyncRequest(&wait); | 99 | Result res = object->SyncRequest(&wait); |
| @@ -122,7 +122,7 @@ Result WaitSynchronization1(Handle handle, s64 nano_seconds) { | |||
| 122 | DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%d", handle, object->GetTypeName(), | 122 | DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%d", handle, object->GetTypeName(), |
| 123 | object->GetName(), nano_seconds); | 123 | object->GetName(), nano_seconds); |
| 124 | 124 | ||
| 125 | _assert_msg_(KERNEL, (object != NULL), "called, but kernel object is NULL!"); | 125 | _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!"); |
| 126 | 126 | ||
| 127 | Result res = object->WaitSynchronization(&wait); | 127 | Result res = object->WaitSynchronization(&wait); |
| 128 | 128 | ||
| @@ -152,8 +152,8 @@ Result WaitSynchronizationN(void* _out, void* _handles, u32 handle_count, u32 wa | |||
| 152 | bool wait = false; | 152 | bool wait = false; |
| 153 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]); | 153 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]); |
| 154 | 154 | ||
| 155 | _assert_msg_(KERNEL, (object != NULL), "called handle=0x%08X, but kernel object " | 155 | _assert_msg_(KERNEL, (object != nullptr), "called handle=0x%08X, but kernel object " |
| 156 | "is NULL!", handles[i]); | 156 | "is nullptr!", handles[i]); |
| 157 | 157 | ||
| 158 | DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName(), | 158 | DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName(), |
| 159 | object->GetName()); | 159 | object->GetName()); |
| @@ -278,7 +278,7 @@ Result CreateMutex(void* _mutex, u32 initial_locked) { | |||
| 278 | /// Release a mutex | 278 | /// Release a mutex |
| 279 | Result ReleaseMutex(Handle handle) { | 279 | Result ReleaseMutex(Handle handle) { |
| 280 | DEBUG_LOG(SVC, "called handle=0x%08X", handle); | 280 | DEBUG_LOG(SVC, "called handle=0x%08X", handle); |
| 281 | _assert_msg_(KERNEL, (handle != 0), "called, but handle is NULL!"); | 281 | _assert_msg_(KERNEL, (handle != 0), "called, but handle is nullptr!"); |
| 282 | Kernel::ReleaseMutex(handle); | 282 | Kernel::ReleaseMutex(handle); |
| 283 | return 0; | 283 | return 0; |
| 284 | } | 284 | } |
| @@ -342,132 +342,132 @@ void SleepThread(s64 nanoseconds) { | |||
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | const HLE::FunctionDef SVC_Table[] = { | 344 | const HLE::FunctionDef SVC_Table[] = { |
| 345 | {0x00, NULL, "Unknown"}, | 345 | {0x00, nullptr, "Unknown"}, |
| 346 | {0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"}, | 346 | {0x01, WrapI_VUUUUU<ControlMemory>, "ControlMemory"}, |
| 347 | {0x02, WrapI_VVU<QueryMemory>, "QueryMemory"}, | 347 | {0x02, WrapI_VVU<QueryMemory>, "QueryMemory"}, |
| 348 | {0x03, NULL, "ExitProcess"}, | 348 | {0x03, nullptr, "ExitProcess"}, |
| 349 | {0x04, NULL, "GetProcessAffinityMask"}, | 349 | {0x04, nullptr, "GetProcessAffinityMask"}, |
| 350 | {0x05, NULL, "SetProcessAffinityMask"}, | 350 | {0x05, nullptr, "SetProcessAffinityMask"}, |
| 351 | {0x06, NULL, "GetProcessIdealProcessor"}, | 351 | {0x06, nullptr, "GetProcessIdealProcessor"}, |
| 352 | {0x07, NULL, "SetProcessIdealProcessor"}, | 352 | {0x07, nullptr, "SetProcessIdealProcessor"}, |
| 353 | {0x08, WrapI_UUUUU<CreateThread>, "CreateThread"}, | 353 | {0x08, WrapI_UUUUU<CreateThread>, "CreateThread"}, |
| 354 | {0x09, WrapU_V<ExitThread>, "ExitThread"}, | 354 | {0x09, WrapU_V<ExitThread>, "ExitThread"}, |
| 355 | {0x0A, WrapV_S64<SleepThread>, "SleepThread"}, | 355 | {0x0A, WrapV_S64<SleepThread>, "SleepThread"}, |
| 356 | {0x0B, WrapI_VU<GetThreadPriority>, "GetThreadPriority"}, | 356 | {0x0B, WrapI_VU<GetThreadPriority>, "GetThreadPriority"}, |
| 357 | {0x0C, WrapI_UI<SetThreadPriority>, "SetThreadPriority"}, | 357 | {0x0C, WrapI_UI<SetThreadPriority>, "SetThreadPriority"}, |
| 358 | {0x0D, NULL, "GetThreadAffinityMask"}, | 358 | {0x0D, nullptr, "GetThreadAffinityMask"}, |
| 359 | {0x0E, NULL, "SetThreadAffinityMask"}, | 359 | {0x0E, nullptr, "SetThreadAffinityMask"}, |
| 360 | {0x0F, NULL, "GetThreadIdealProcessor"}, | 360 | {0x0F, nullptr, "GetThreadIdealProcessor"}, |
| 361 | {0x10, NULL, "SetThreadIdealProcessor"}, | 361 | {0x10, nullptr, "SetThreadIdealProcessor"}, |
| 362 | {0x11, NULL, "GetCurrentProcessorNumber"}, | 362 | {0x11, nullptr, "GetCurrentProcessorNumber"}, |
| 363 | {0x12, NULL, "Run"}, | 363 | {0x12, nullptr, "Run"}, |
| 364 | {0x13, WrapI_VU<CreateMutex>, "CreateMutex"}, | 364 | {0x13, WrapI_VU<CreateMutex>, "CreateMutex"}, |
| 365 | {0x14, WrapI_U<ReleaseMutex>, "ReleaseMutex"}, | 365 | {0x14, WrapI_U<ReleaseMutex>, "ReleaseMutex"}, |
| 366 | {0x15, NULL, "CreateSemaphore"}, | 366 | {0x15, nullptr, "CreateSemaphore"}, |
| 367 | {0x16, NULL, "ReleaseSemaphore"}, | 367 | {0x16, nullptr, "ReleaseSemaphore"}, |
| 368 | {0x17, WrapI_VU<CreateEvent>, "CreateEvent"}, | 368 | {0x17, WrapI_VU<CreateEvent>, "CreateEvent"}, |
| 369 | {0x18, WrapI_U<SignalEvent>, "SignalEvent"}, | 369 | {0x18, WrapI_U<SignalEvent>, "SignalEvent"}, |
| 370 | {0x19, WrapI_U<ClearEvent>, "ClearEvent"}, | 370 | {0x19, WrapI_U<ClearEvent>, "ClearEvent"}, |
| 371 | {0x1A, NULL, "CreateTimer"}, | 371 | {0x1A, nullptr, "CreateTimer"}, |
| 372 | {0x1B, NULL, "SetTimer"}, | 372 | {0x1B, nullptr, "SetTimer"}, |
| 373 | {0x1C, NULL, "CancelTimer"}, | 373 | {0x1C, nullptr, "CancelTimer"}, |
| 374 | {0x1D, NULL, "ClearTimer"}, | 374 | {0x1D, nullptr, "ClearTimer"}, |
| 375 | {0x1E, NULL, "CreateMemoryBlock"}, | 375 | {0x1E, nullptr, "CreateMemoryBlock"}, |
| 376 | {0x1F, WrapI_UUUU<MapMemoryBlock>, "MapMemoryBlock"}, | 376 | {0x1F, WrapI_UUUU<MapMemoryBlock>, "MapMemoryBlock"}, |
| 377 | {0x20, NULL, "UnmapMemoryBlock"}, | 377 | {0x20, nullptr, "UnmapMemoryBlock"}, |
| 378 | {0x21, WrapI_V<CreateAddressArbiter>, "CreateAddressArbiter"}, | 378 | {0x21, WrapI_V<CreateAddressArbiter>, "CreateAddressArbiter"}, |
| 379 | {0x22, WrapI_UUUUS64<ArbitrateAddress>, "ArbitrateAddress"}, | 379 | {0x22, WrapI_UUUUS64<ArbitrateAddress>, "ArbitrateAddress"}, |
| 380 | {0x23, WrapI_U<CloseHandle>, "CloseHandle"}, | 380 | {0x23, WrapI_U<CloseHandle>, "CloseHandle"}, |
| 381 | {0x24, WrapI_US64<WaitSynchronization1>, "WaitSynchronization1"}, | 381 | {0x24, WrapI_US64<WaitSynchronization1>, "WaitSynchronization1"}, |
| 382 | {0x25, WrapI_VVUUS64<WaitSynchronizationN>, "WaitSynchronizationN"}, | 382 | {0x25, WrapI_VVUUS64<WaitSynchronizationN>, "WaitSynchronizationN"}, |
| 383 | {0x26, NULL, "SignalAndWait"}, | 383 | {0x26, nullptr, "SignalAndWait"}, |
| 384 | {0x27, WrapI_VU<DuplicateHandle>, "DuplicateHandle"}, | 384 | {0x27, WrapI_VU<DuplicateHandle>, "DuplicateHandle"}, |
| 385 | {0x28, NULL, "GetSystemTick"}, | 385 | {0x28, nullptr, "GetSystemTick"}, |
| 386 | {0x29, NULL, "GetHandleInfo"}, | 386 | {0x29, nullptr, "GetHandleInfo"}, |
| 387 | {0x2A, NULL, "GetSystemInfo"}, | 387 | {0x2A, nullptr, "GetSystemInfo"}, |
| 388 | {0x2B, NULL, "GetProcessInfo"}, | 388 | {0x2B, nullptr, "GetProcessInfo"}, |
| 389 | {0x2C, NULL, "GetThreadInfo"}, | 389 | {0x2C, nullptr, "GetThreadInfo"}, |
| 390 | {0x2D, WrapI_VC<ConnectToPort>, "ConnectToPort"}, | 390 | {0x2D, WrapI_VC<ConnectToPort>, "ConnectToPort"}, |
| 391 | {0x2E, NULL, "SendSyncRequest1"}, | 391 | {0x2E, nullptr, "SendSyncRequest1"}, |
| 392 | {0x2F, NULL, "SendSyncRequest2"}, | 392 | {0x2F, nullptr, "SendSyncRequest2"}, |
| 393 | {0x30, NULL, "SendSyncRequest3"}, | 393 | {0x30, nullptr, "SendSyncRequest3"}, |
| 394 | {0x31, NULL, "SendSyncRequest4"}, | 394 | {0x31, nullptr, "SendSyncRequest4"}, |
| 395 | {0x32, WrapI_U<SendSyncRequest>, "SendSyncRequest"}, | 395 | {0x32, WrapI_U<SendSyncRequest>, "SendSyncRequest"}, |
| 396 | {0x33, NULL, "OpenProcess"}, | 396 | {0x33, nullptr, "OpenProcess"}, |
| 397 | {0x34, NULL, "OpenThread"}, | 397 | {0x34, nullptr, "OpenThread"}, |
| 398 | {0x35, NULL, "GetProcessId"}, | 398 | {0x35, nullptr, "GetProcessId"}, |
| 399 | {0x36, NULL, "GetProcessIdOfThread"}, | 399 | {0x36, nullptr, "GetProcessIdOfThread"}, |
| 400 | {0x37, WrapI_VU<GetThreadId>, "GetThreadId"}, | 400 | {0x37, WrapI_VU<GetThreadId>, "GetThreadId"}, |
| 401 | {0x38, WrapI_VU<GetResourceLimit>, "GetResourceLimit"}, | 401 | {0x38, WrapI_VU<GetResourceLimit>, "GetResourceLimit"}, |
| 402 | {0x39, NULL, "GetResourceLimitLimitValues"}, | 402 | {0x39, nullptr, "GetResourceLimitLimitValues"}, |
| 403 | {0x3A, WrapI_VUVI<GetResourceLimitCurrentValues>, "GetResourceLimitCurrentValues"}, | 403 | {0x3A, WrapI_VUVI<GetResourceLimitCurrentValues>, "GetResourceLimitCurrentValues"}, |
| 404 | {0x3B, NULL, "GetThreadContext"}, | 404 | {0x3B, nullptr, "GetThreadContext"}, |
| 405 | {0x3C, NULL, "Break"}, | 405 | {0x3C, nullptr, "Break"}, |
| 406 | {0x3D, WrapV_C<OutputDebugString>, "OutputDebugString"}, | 406 | {0x3D, WrapV_C<OutputDebugString>, "OutputDebugString"}, |
| 407 | {0x3E, NULL, "ControlPerformanceCounter"}, | 407 | {0x3E, nullptr, "ControlPerformanceCounter"}, |
| 408 | {0x3F, NULL, "Unknown"}, | 408 | {0x3F, nullptr, "Unknown"}, |
| 409 | {0x40, NULL, "Unknown"}, | 409 | {0x40, nullptr, "Unknown"}, |
| 410 | {0x41, NULL, "Unknown"}, | 410 | {0x41, nullptr, "Unknown"}, |
| 411 | {0x42, NULL, "Unknown"}, | 411 | {0x42, nullptr, "Unknown"}, |
| 412 | {0x43, NULL, "Unknown"}, | 412 | {0x43, nullptr, "Unknown"}, |
| 413 | {0x44, NULL, "Unknown"}, | 413 | {0x44, nullptr, "Unknown"}, |
| 414 | {0x45, NULL, "Unknown"}, | 414 | {0x45, nullptr, "Unknown"}, |
| 415 | {0x46, NULL, "Unknown"}, | 415 | {0x46, nullptr, "Unknown"}, |
| 416 | {0x47, NULL, "CreatePort"}, | 416 | {0x47, nullptr, "CreatePort"}, |
| 417 | {0x48, NULL, "CreateSessionToPort"}, | 417 | {0x48, nullptr, "CreateSessionToPort"}, |
| 418 | {0x49, NULL, "CreateSession"}, | 418 | {0x49, nullptr, "CreateSession"}, |
| 419 | {0x4A, NULL, "AcceptSession"}, | 419 | {0x4A, nullptr, "AcceptSession"}, |
| 420 | {0x4B, NULL, "ReplyAndReceive1"}, | 420 | {0x4B, nullptr, "ReplyAndReceive1"}, |
| 421 | {0x4C, NULL, "ReplyAndReceive2"}, | 421 | {0x4C, nullptr, "ReplyAndReceive2"}, |
| 422 | {0x4D, NULL, "ReplyAndReceive3"}, | 422 | {0x4D, nullptr, "ReplyAndReceive3"}, |
| 423 | {0x4E, NULL, "ReplyAndReceive4"}, | 423 | {0x4E, nullptr, "ReplyAndReceive4"}, |
| 424 | {0x4F, NULL, "ReplyAndReceive"}, | 424 | {0x4F, nullptr, "ReplyAndReceive"}, |
| 425 | {0x50, NULL, "BindInterrupt"}, | 425 | {0x50, nullptr, "BindInterrupt"}, |
| 426 | {0x51, NULL, "UnbindInterrupt"}, | 426 | {0x51, nullptr, "UnbindInterrupt"}, |
| 427 | {0x52, NULL, "InvalidateProcessDataCache"}, | 427 | {0x52, nullptr, "InvalidateProcessDataCache"}, |
| 428 | {0x53, NULL, "StoreProcessDataCache"}, | 428 | {0x53, nullptr, "StoreProcessDataCache"}, |
| 429 | {0x54, NULL, "FlushProcessDataCache"}, | 429 | {0x54, nullptr, "FlushProcessDataCache"}, |
| 430 | {0x55, NULL, "StartInterProcessDma"}, | 430 | {0x55, nullptr, "StartInterProcessDma"}, |
| 431 | {0x56, NULL, "StopDma"}, | 431 | {0x56, nullptr, "StopDma"}, |
| 432 | {0x57, NULL, "GetDmaState"}, | 432 | {0x57, nullptr, "GetDmaState"}, |
| 433 | {0x58, NULL, "RestartDma"}, | 433 | {0x58, nullptr, "RestartDma"}, |
| 434 | {0x59, NULL, "Unknown"}, | 434 | {0x59, nullptr, "Unknown"}, |
| 435 | {0x5A, NULL, "Unknown"}, | 435 | {0x5A, nullptr, "Unknown"}, |
| 436 | {0x5B, NULL, "Unknown"}, | 436 | {0x5B, nullptr, "Unknown"}, |
| 437 | {0x5C, NULL, "Unknown"}, | 437 | {0x5C, nullptr, "Unknown"}, |
| 438 | {0x5D, NULL, "Unknown"}, | 438 | {0x5D, nullptr, "Unknown"}, |
| 439 | {0x5E, NULL, "Unknown"}, | 439 | {0x5E, nullptr, "Unknown"}, |
| 440 | {0x5F, NULL, "Unknown"}, | 440 | {0x5F, nullptr, "Unknown"}, |
| 441 | {0x60, NULL, "DebugActiveProcess"}, | 441 | {0x60, nullptr, "DebugActiveProcess"}, |
| 442 | {0x61, NULL, "BreakDebugProcess"}, | 442 | {0x61, nullptr, "BreakDebugProcess"}, |
| 443 | {0x62, NULL, "TerminateDebugProcess"}, | 443 | {0x62, nullptr, "TerminateDebugProcess"}, |
| 444 | {0x63, NULL, "GetProcessDebugEvent"}, | 444 | {0x63, nullptr, "GetProcessDebugEvent"}, |
| 445 | {0x64, NULL, "ContinueDebugEvent"}, | 445 | {0x64, nullptr, "ContinueDebugEvent"}, |
| 446 | {0x65, NULL, "GetProcessList"}, | 446 | {0x65, nullptr, "GetProcessList"}, |
| 447 | {0x66, NULL, "GetThreadList"}, | 447 | {0x66, nullptr, "GetThreadList"}, |
| 448 | {0x67, NULL, "GetDebugThreadContext"}, | 448 | {0x67, nullptr, "GetDebugThreadContext"}, |
| 449 | {0x68, NULL, "SetDebugThreadContext"}, | 449 | {0x68, nullptr, "SetDebugThreadContext"}, |
| 450 | {0x69, NULL, "QueryDebugProcessMemory"}, | 450 | {0x69, nullptr, "QueryDebugProcessMemory"}, |
| 451 | {0x6A, NULL, "ReadProcessMemory"}, | 451 | {0x6A, nullptr, "ReadProcessMemory"}, |
| 452 | {0x6B, NULL, "WriteProcessMemory"}, | 452 | {0x6B, nullptr, "WriteProcessMemory"}, |
| 453 | {0x6C, NULL, "SetHardwareBreakPoint"}, | 453 | {0x6C, nullptr, "SetHardwareBreakPoint"}, |
| 454 | {0x6D, NULL, "GetDebugThreadParam"}, | 454 | {0x6D, nullptr, "GetDebugThreadParam"}, |
| 455 | {0x6E, NULL, "Unknown"}, | 455 | {0x6E, nullptr, "Unknown"}, |
| 456 | {0x6F, NULL, "Unknown"}, | 456 | {0x6F, nullptr, "Unknown"}, |
| 457 | {0x70, NULL, "ControlProcessMemory"}, | 457 | {0x70, nullptr, "ControlProcessMemory"}, |
| 458 | {0x71, NULL, "MapProcessMemory"}, | 458 | {0x71, nullptr, "MapProcessMemory"}, |
| 459 | {0x72, NULL, "UnmapProcessMemory"}, | 459 | {0x72, nullptr, "UnmapProcessMemory"}, |
| 460 | {0x73, NULL, "Unknown"}, | 460 | {0x73, nullptr, "Unknown"}, |
| 461 | {0x74, NULL, "Unknown"}, | 461 | {0x74, nullptr, "Unknown"}, |
| 462 | {0x75, NULL, "Unknown"}, | 462 | {0x75, nullptr, "Unknown"}, |
| 463 | {0x76, NULL, "TerminateProcess"}, | 463 | {0x76, nullptr, "TerminateProcess"}, |
| 464 | {0x77, NULL, "Unknown"}, | 464 | {0x77, nullptr, "Unknown"}, |
| 465 | {0x78, NULL, "CreateResourceLimit"}, | 465 | {0x78, nullptr, "CreateResourceLimit"}, |
| 466 | {0x79, NULL, "Unknown"}, | 466 | {0x79, nullptr, "Unknown"}, |
| 467 | {0x7A, NULL, "Unknown"}, | 467 | {0x7A, nullptr, "Unknown"}, |
| 468 | {0x7B, NULL, "Unknown"}, | 468 | {0x7B, nullptr, "Unknown"}, |
| 469 | {0x7C, NULL, "KernelSetState"}, | 469 | {0x7C, nullptr, "KernelSetState"}, |
| 470 | {0x7D, NULL, "QueryProcessMemory"}, | 470 | {0x7D, nullptr, "QueryProcessMemory"}, |
| 471 | }; | 471 | }; |
| 472 | 472 | ||
| 473 | void Register() { | 473 | void Register() { |