thread: added correct lowest thread priority, added a thread priority check, and added some comments

This commit is contained in:
bunnei 2014-05-20 21:02:35 -04:00
parent bed4e920fa
commit 203541da11
2 changed files with 10 additions and 6 deletions

View file

@ -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);