core: backport some ResultCode updates (#6645)

Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
This commit is contained in:
GPUCode
2023-07-03 03:23:53 +03:00
committed by GitHub
parent 0b37c1da57
commit 2126c240cd
34 changed files with 1204 additions and 277 deletions

View File

@ -31,7 +31,7 @@ ResultVal<std::shared_ptr<Semaphore>> KernelSystem::CreateSemaphore(s32 initial_
semaphore->available_count = initial_count;
semaphore->name = std::move(name);
return MakeResult<std::shared_ptr<Semaphore>>(std::move(semaphore));
return semaphore;
}
bool Semaphore::ShouldWait(const Thread* thread) const {
@ -53,7 +53,7 @@ ResultVal<s32> Semaphore::Release(s32 release_count) {
WakeupAllWaitingThreads();
return MakeResult<s32>(previous_count);
return previous_count;
}
} // namespace Kernel