Clean up some warnings

This commit is contained in:
Chin 2014-12-19 22:16:34 -05:00
parent eb394ac0af
commit e795692614
8 changed files with 27 additions and 20 deletions

View file

@ -20,8 +20,8 @@ public:
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Semaphore; }
Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::Semaphore; }
u32 max_count; ///< Maximum number of simultaneous holders the semaphore can have
u32 available_count; ///< Number of free slots left in the semaphore
s32 max_count; ///< Maximum number of simultaneous holders the semaphore can have
s32 available_count; ///< Number of free slots left in the semaphore
std::queue<Handle> waiting_threads; ///< Threads that are waiting for the semaphore
std::string name; ///< Name of semaphore (optional)
@ -49,8 +49,8 @@ public:
////////////////////////////////////////////////////////////////////////////////////////////////////
ResultCode CreateSemaphore(Handle* handle, u32 initial_count,
u32 max_count, const std::string& name) {
ResultCode CreateSemaphore(Handle* handle, s32 initial_count,
s32 max_count, const std::string& name) {
if (initial_count > max_count)
return ResultCode(ErrorDescription::InvalidCombination, ErrorModule::Kernel,

View file

@ -18,7 +18,7 @@ namespace Kernel {
* @param name Optional name of semaphore
* @return ResultCode of the error
*/
ResultCode CreateSemaphore(Handle* handle, u32 initial_count, u32 max_count, const std::string& name = "Unknown");
ResultCode CreateSemaphore(Handle* handle, s32 initial_count, s32 max_count, const std::string& name = "Unknown");
/**
* Releases a certain number of slots from a semaphore.