diff options
Diffstat (limited to 'src/core/hle/kernel')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/mutex.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 9d5991c37..e51a9d45a 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -128,7 +128,7 @@ Object* ObjectPool::CreateByIDType(int type) { | |||
| 128 | 128 | ||
| 129 | default: | 129 | default: |
| 130 | ERROR_LOG(COMMON, "Unable to load state: could not find object type %d.", type); | 130 | ERROR_LOG(COMMON, "Unable to load state: could not find object type %d.", type); |
| 131 | return NULL; | 131 | return nullptr; |
| 132 | } | 132 | } |
| 133 | } | 133 | } |
| 134 | 134 | ||
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index a76c8de03..1ccf1eb73 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp | |||
| @@ -122,7 +122,7 @@ bool ReleaseMutex(Mutex* mutex) { | |||
| 122 | Result ReleaseMutex(Handle handle) { | 122 | Result ReleaseMutex(Handle handle) { |
| 123 | Mutex* mutex = Kernel::g_object_pool.GetFast<Mutex>(handle); | 123 | Mutex* mutex = Kernel::g_object_pool.GetFast<Mutex>(handle); |
| 124 | 124 | ||
| 125 | _assert_msg_(KERNEL, (mutex != NULL), "ReleaseMutex tried to release a NULL mutex!"); | 125 | _assert_msg_(KERNEL, (mutex != nullptr), "ReleaseMutex tried to release a nullptr mutex!"); |
| 126 | 126 | ||
| 127 | if (!ReleaseMutex(mutex)) { | 127 | if (!ReleaseMutex(mutex)) { |
| 128 | return -1; | 128 | return -1; |
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 5fdb4fbe6..700f4ea7c 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -223,7 +223,7 @@ void SwitchContext(Thread* t) { | |||
| 223 | t->wait_type = WAITTYPE_NONE; | 223 | t->wait_type = WAITTYPE_NONE; |
| 224 | LoadContext(t->context); | 224 | LoadContext(t->context); |
| 225 | } else { | 225 | } else { |
| 226 | SetCurrentThread(NULL); | 226 | SetCurrentThread(nullptr); |
| 227 | } | 227 | } |
| 228 | } | 228 | } |
| 229 | 229 | ||
| @@ -238,7 +238,7 @@ Thread* NextThread() { | |||
| 238 | next = g_thread_ready_queue.pop_first(); | 238 | next = g_thread_ready_queue.pop_first(); |
| 239 | } | 239 | } |
| 240 | if (next == 0) { | 240 | if (next == 0) { |
| 241 | return NULL; | 241 | return nullptr; |
| 242 | } | 242 | } |
| 243 | return Kernel::g_object_pool.GetFast<Thread>(next); | 243 | return Kernel::g_object_pool.GetFast<Thread>(next); |
| 244 | } | 244 | } |
| @@ -312,8 +312,8 @@ Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 prio | |||
| 312 | Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s32 processor_id, | 312 | Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s32 processor_id, |
| 313 | u32 stack_top, int stack_size) { | 313 | u32 stack_top, int stack_size) { |
| 314 | 314 | ||
| 315 | if (name == NULL) { | 315 | if (name == nullptr) { |
| 316 | ERROR_LOG(KERNEL, "CreateThread(): NULL name"); | 316 | ERROR_LOG(KERNEL, "CreateThread(): nullptr name"); |
| 317 | return -1; | 317 | return -1; |
| 318 | } | 318 | } |
| 319 | if ((u32)stack_size < 0x200) { | 319 | if ((u32)stack_size < 0x200) { |
| @@ -353,19 +353,19 @@ Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s3 | |||
| 353 | /// Get the priority of the thread specified by handle | 353 | /// Get the priority of the thread specified by handle |
| 354 | u32 GetThreadPriority(const Handle handle) { | 354 | u32 GetThreadPriority(const Handle handle) { |
| 355 | Thread* thread = g_object_pool.GetFast<Thread>(handle); | 355 | Thread* thread = g_object_pool.GetFast<Thread>(handle); |
| 356 | _assert_msg_(KERNEL, (thread != NULL), "called, but thread is NULL!"); | 356 | _assert_msg_(KERNEL, (thread != nullptr), "called, but thread is nullptr!"); |
| 357 | return thread->current_priority; | 357 | return thread->current_priority; |
| 358 | } | 358 | } |
| 359 | 359 | ||
| 360 | /// Set the priority of the thread specified by handle | 360 | /// Set the priority of the thread specified by handle |
| 361 | Result SetThreadPriority(Handle handle, s32 priority) { | 361 | Result SetThreadPriority(Handle handle, s32 priority) { |
| 362 | Thread* thread = NULL; | 362 | Thread* thread = nullptr; |
| 363 | if (!handle) { | 363 | if (!handle) { |
| 364 | thread = GetCurrentThread(); // TODO(bunnei): Is this correct behavior? | 364 | thread = GetCurrentThread(); // TODO(bunnei): Is this correct behavior? |
| 365 | } else { | 365 | } else { |
| 366 | thread = g_object_pool.GetFast<Thread>(handle); | 366 | thread = g_object_pool.GetFast<Thread>(handle); |
| 367 | } | 367 | } |
| 368 | _assert_msg_(KERNEL, (thread != NULL), "called, but thread is NULL!"); | 368 | _assert_msg_(KERNEL, (thread != nullptr), "called, but thread is nullptr!"); |
| 369 | 369 | ||
| 370 | // If priority is invalid, clamp to valid range | 370 | // If priority is invalid, clamp to valid range |
| 371 | if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { | 371 | if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { |