From 52d2c4ddc164086dd4a8098dbd3679804f565769 Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Sat, 30 Aug 2025 19:24:58 -0700 Subject: [PATCH] semaphore: Invert priority order. (#3488) * semaphore: Invert priority order. * playgo: Lower logs for some spammed functions. --- src/core/libraries/kernel/threads/semaphore.cpp | 4 ++-- src/core/libraries/playgo/playgo.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/libraries/kernel/threads/semaphore.cpp b/src/core/libraries/kernel/threads/semaphore.cpp index f25a76c2b..4161a35b2 100644 --- a/src/core/libraries/kernel/threads/semaphore.cpp +++ b/src/core/libraries/kernel/threads/semaphore.cpp @@ -172,9 +172,9 @@ public: wait_list.push_back(waiter); return --wait_list.end(); } - // Find the first with priority less then us and insert right before it. + // Find the first with lower priority (greater number) than us and insert right before it. auto it = wait_list.begin(); - while (it != wait_list.end() && (*it)->priority > waiter->priority) { + while (it != wait_list.end() && (*it)->priority <= waiter->priority) { ++it; } return wait_list.insert(it, waiter); diff --git a/src/core/libraries/playgo/playgo.cpp b/src/core/libraries/playgo/playgo.cpp index 221d6f109..4ea7724c5 100644 --- a/src/core/libraries/playgo/playgo.cpp +++ b/src/core/libraries/playgo/playgo.cpp @@ -39,7 +39,7 @@ s32 PS4_SYSV_ABI scePlayGoClose(OrbisPlayGoHandle handle) { s32 PS4_SYSV_ABI scePlayGoGetChunkId(OrbisPlayGoHandle handle, OrbisPlayGoChunkId* outChunkIdList, u32 numberOfEntries, u32* outEntries) { - LOG_INFO(Lib_PlayGo, "called"); + LOG_DEBUG(Lib_PlayGo, "called"); if (handle != PlaygoHandle) { return ORBIS_PLAYGO_ERROR_BAD_HANDLE; @@ -74,7 +74,7 @@ s32 PS4_SYSV_ABI scePlayGoGetChunkId(OrbisPlayGoHandle handle, OrbisPlayGoChunkI s32 PS4_SYSV_ABI scePlayGoGetEta(OrbisPlayGoHandle handle, const OrbisPlayGoChunkId* chunkIds, u32 numberOfEntries, OrbisPlayGoEta* outEta) { - LOG_INFO(Lib_PlayGo, "called"); + LOG_DEBUG(Lib_PlayGo, "called"); if (handle != PlaygoHandle) { return ORBIS_PLAYGO_ERROR_BAD_HANDLE; } @@ -170,8 +170,8 @@ s32 PS4_SYSV_ABI scePlayGoGetLocus(OrbisPlayGoHandle handle, const OrbisPlayGoCh s32 PS4_SYSV_ABI scePlayGoGetProgress(OrbisPlayGoHandle handle, const OrbisPlayGoChunkId* chunkIds, uint32_t numberOfEntries, OrbisPlayGoProgress* outProgress) { - LOG_INFO(Lib_PlayGo, "called handle = {}, chunkIds = {}, numberOfEntries = {}", handle, - *chunkIds, numberOfEntries); + LOG_DEBUG(Lib_PlayGo, "called handle = {}, chunkIds = {}, numberOfEntries = {}", handle, + *chunkIds, numberOfEntries); if (handle != PlaygoHandle) { return ORBIS_PLAYGO_ERROR_BAD_HANDLE;