Fixed type conversion ambiguity

This commit is contained in:
Huw Pascoe 2017-09-27 00:26:09 +01:00
parent b07af7dda8
commit a13ab958cb
32 changed files with 97 additions and 91 deletions

View file

@ -15,7 +15,7 @@
#include "core/hle/kernel/wait_object.h"
#include "core/hle/result.h"
enum ThreadPriority : s32 {
enum ThreadPriority : u32 {
THREADPRIO_HIGHEST = 0, ///< Highest thread priority
THREADPRIO_USERLAND_MAX = 24, ///< Highest thread priority for userland apps
THREADPRIO_DEFAULT = 48, ///< Default thread priority for userland apps
@ -82,7 +82,7 @@ public:
* Gets the thread's current priority
* @return The current thread's priority
*/
s32 GetPriority() const {
u32 GetPriority() const {
return current_priority;
}
@ -90,7 +90,7 @@ public:
* Sets the thread's current priority
* @param priority The new priority
*/
void SetPriority(s32 priority);
void SetPriority(u32 priority);
/**
* Boost's a thread's priority to the best priority among the thread's held mutexes.
@ -102,7 +102,7 @@ public:
* Temporarily boosts the thread's priority until the next time it is scheduled
* @param priority The new priority
*/
void BoostPriority(s32 priority);
void BoostPriority(u32 priority);
/**
* Gets the thread's thread ID
@ -176,8 +176,8 @@ public:
u32 entry_point;
u32 stack_top;
s32 nominal_priority; ///< Nominal thread priority, as set by the emulated application
s32 current_priority; ///< Current thread priority, can be temporarily changed
u32 nominal_priority; ///< Nominal thread priority, as set by the emulated application
u32 current_priority; ///< Current thread priority, can be temporarily changed
u64 last_running_ticks; ///< CPU tick when thread was last running
@ -219,7 +219,7 @@ private:
* @param owner_process The parent process for the main thread
* @return A shared pointer to the main thread
*/
SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority, SharedPtr<Process> owner_process);
SharedPtr<Thread> SetupMainThread(u32 entry_point, u32 priority, SharedPtr<Process> owner_process);
/**
* Returns whether there are any threads that are ready to run.