aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/event.cpp2
-rw-r--r--src/core/hle/kernel/kernel.cpp4
-rw-r--r--src/core/hle/kernel/mutex.cpp2
-rw-r--r--src/core/hle/kernel/semaphore.cpp2
-rw-r--r--src/core/hle/kernel/session.h2
-rw-r--r--src/core/hle/kernel/thread.cpp14
-rw-r--r--src/core/hle/kernel/timer.cpp2
7 files changed, 13 insertions, 15 deletions
diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp
index 898e1c98..420906ec 100644
--- a/src/core/hle/kernel/event.cpp
+++ b/src/core/hle/kernel/event.cpp
@@ -32,7 +32,7 @@ bool Event::ShouldWait() {
}
void Event::Acquire() {
- _assert_msg_(Kernel, !ShouldWait(), "object unavailable!");
+ ASSERT_MSG(!ShouldWait(), "object unavailable!");
// Release the event if it's not sticky...
if (reset_type != RESETTYPE_STICKY)
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index a2ffbcdb..eb61d8ef 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -52,7 +52,7 @@ void WaitObject::WakeupAllWaitingThreads() {
for (auto thread : waiting_threads_copy)
thread->ReleaseWaitObject(this);
- _assert_msg_(Kernel, waiting_threads.empty(), "failed to awaken all waiting threads!");
+ ASSERT_MSG(waiting_threads.empty(), "failed to awaken all waiting threads!");
}
HandleTable::HandleTable() {
@@ -61,7 +61,7 @@ HandleTable::HandleTable() {
}
ResultVal<Handle> HandleTable::Create(SharedPtr<Object> obj) {
- _dbg_assert_(Kernel, obj != nullptr);
+ DEBUG_ASSERT(obj != nullptr);
u16 slot = next_free_slot;
if (slot >= generations.size()) {
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index a811db39..be2c4970 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -64,7 +64,7 @@ void Mutex::Acquire() {
}
void Mutex::Acquire(SharedPtr<Thread> thread) {
- _assert_msg_(Kernel, !ShouldWait(), "object unavailable!");
+ ASSERT_MSG(!ShouldWait(), "object unavailable!");
// Actually "acquire" the mutex only if we don't already have it...
if (lock_count == 0) {
diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp
index c8cf8b9a..6aecc24a 100644
--- a/src/core/hle/kernel/semaphore.cpp
+++ b/src/core/hle/kernel/semaphore.cpp
@@ -36,7 +36,7 @@ bool Semaphore::ShouldWait() {
}
void Semaphore::Acquire() {
- _assert_msg_(Kernel, !ShouldWait(), "object unavailable!");
+ ASSERT_MSG(!ShouldWait(), "object unavailable!");
--available_count;
}
diff --git a/src/core/hle/kernel/session.h b/src/core/hle/kernel/session.h
index 7cc9332c..9e9288e0 100644
--- a/src/core/hle/kernel/session.h
+++ b/src/core/hle/kernel/session.h
@@ -66,7 +66,7 @@ public:
}
void Acquire() override {
- _assert_msg_(Kernel, !ShouldWait(), "object unavailable!");
+ ASSERT_MSG(!ShouldWait(), "object unavailable!");
}
};
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 7f629c20..f8c834a8 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -29,7 +29,7 @@ bool Thread::ShouldWait() {
}
void Thread::Acquire() {
- _assert_msg_(Kernel, !ShouldWait(), "object unavailable!");
+ ASSERT_MSG(!ShouldWait(), "object unavailable!");
}
// Lists all thread ids that aren't deleted/etc.
@@ -144,7 +144,7 @@ void ArbitrateAllThreads(u32 address) {
* @param new_thread The thread to switch to
*/
static void SwitchContext(Thread* new_thread) {
- _dbg_assert_msg_(Kernel, new_thread->status == THREADSTATUS_READY, "Thread must be ready to become running.");
+ DEBUG_ASSERT_MSG(new_thread->status == THREADSTATUS_READY, "Thread must be ready to become running.");
Thread* previous_thread = GetCurrentThread();
@@ -304,14 +304,12 @@ void Thread::ResumeFromWait() {
break;
case THREADSTATUS_RUNNING:
case THREADSTATUS_READY:
- LOG_ERROR(Kernel, "Thread with object id %u has already resumed.", GetObjectId());
- _dbg_assert_(Kernel, false);
+ DEBUG_ASSERT_MSG(false, "Thread with object id %u has already resumed.", GetObjectId());
return;
case THREADSTATUS_DEAD:
// This should never happen, as threads must complete before being stopped.
- LOG_CRITICAL(Kernel, "Thread with object id %u cannot be resumed because it's DEAD.",
+ DEBUG_ASSERT_MSG(false, "Thread with object id %u cannot be resumed because it's DEAD.",
GetObjectId());
- _dbg_assert_(Kernel, false);
return;
}
@@ -387,7 +385,7 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point,
// TODO(peachum): Remove this. Range checking should be done, and an appropriate error should be returned.
static void ClampPriority(const Thread* thread, s32* priority) {
if (*priority < THREADPRIO_HIGHEST || *priority > THREADPRIO_LOWEST) {
- _dbg_assert_msg_(Kernel, false, "Application passed an out of range priority. An error should be returned.");
+ DEBUG_ASSERT_MSG(false, "Application passed an out of range priority. An error should be returned.");
s32 new_priority = CLAMP(*priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST);
LOG_WARNING(Kernel_SVC, "(name=%s): invalid priority=%d, clamping to %d",
@@ -425,7 +423,7 @@ SharedPtr<Thread> SetupIdleThread() {
}
SharedPtr<Thread> SetupMainThread(u32 stack_size, u32 entry_point, s32 priority) {
- _dbg_assert_(Kernel, !GetCurrentThread());
+ DEBUG_ASSERT(!GetCurrentThread());
// Initialize new "main" thread
auto thread_res = Thread::Create("main", entry_point, priority, 0,
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp
index 4352fc99..aa0afb79 100644
--- a/src/core/hle/kernel/timer.cpp
+++ b/src/core/hle/kernel/timer.cpp
@@ -38,7 +38,7 @@ bool Timer::ShouldWait() {
}
void Timer::Acquire() {
- _assert_msg_(Kernel, !ShouldWait(), "object unavailable!");
+ ASSERT_MSG( !ShouldWait(), "object unavailable!");
}
void Timer::Set(s64 initial, s64 interval) {