summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-05-21 03:02:35 +0200
committerbunnei <ericbunnie@gmail.com>2014-05-21 03:02:35 +0200
commit203541da119cad61096fda20b3ff8a8cb5906fd6 (patch)
tree317ecfabe4ac120e5f90faf2d970522b2234bf5e /src/core/hle
parentthread: exposed ResumeThreadFromWait function for use in other kernel modules (diff)
downloadyuzu-203541da119cad61096fda20b3ff8a8cb5906fd6.tar
yuzu-203541da119cad61096fda20b3ff8a8cb5906fd6.tar.gz
yuzu-203541da119cad61096fda20b3ff8a8cb5906fd6.tar.bz2
yuzu-203541da119cad61096fda20b3ff8a8cb5906fd6.tar.lz
yuzu-203541da119cad61096fda20b3ff8a8cb5906fd6.tar.xz
yuzu-203541da119cad61096fda20b3ff8a8cb5906fd6.tar.zst
yuzu-203541da119cad61096fda20b3ff8a8cb5906fd6.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/thread.cpp3
-rw-r--r--src/core/hle/kernel/thread.h13
2 files changed, 10 insertions, 6 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index af9188faa..294e03ca6 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -223,6 +223,9 @@ void ResumeThreadFromWait(Handle handle) {
Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 priority,
s32 processor_id, u32 stack_top, int stack_size) {
+ _assert_msg_(KERNEL, (priority >= THREADPRIO_HIGHEST && priority <= THREADPRIO_LOWEST),
+ "CreateThread priority=%d, outside of allowable range!", priority)
+
Thread* t = new Thread;
handle = Kernel::g_object_pool.Create(t);
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index bb48ddc79..0d1fe19bf 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -8,15 +8,16 @@
#include "core/hle/kernel/kernel.h"
enum ThreadPriority {
- THREADPRIO_HIGHEST = 0,
- THREADPRIO_DEFAULT = 16,
- THREADPRIO_LOWEST = 31,
+ THREADPRIO_HIGHEST = 0, ///< Highest thread priority
+ THREADPRIO_DEFAULT = 16, ///< Default thread priority for userland apps
+ THREADPRIO_LOW = 31, ///< Low range of thread priority for userland apps
+ THREADPRIO_LOWEST = 63, ///< Thread priority max checked by svcCreateThread
};
enum ThreadProcessorId {
- THREADPROCESSORID_0 = 0xFFFFFFFE,
- THREADPROCESSORID_1 = 0xFFFFFFFD,
- THREADPROCESSORID_ALL = 0xFFFFFFFC,
+ THREADPROCESSORID_0 = 0xFFFFFFFE, ///< Enables core appcode
+ THREADPROCESSORID_1 = 0xFFFFFFFD, ///< Enables core syscore
+ THREADPROCESSORID_ALL = 0xFFFFFFFC, ///< Enables both cores
};
namespace Kernel {