Skip to content

Commit

Permalink
[orbis-kernel] create SceLncSuspendBlock with init value
Browse files Browse the repository at this point in the history
  • Loading branch information
DHrpcs3 committed Oct 18, 2023
1 parent 437d8e7 commit 08a097e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion orbis-kernel/src/sys/sys_sce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,15 @@ orbis::SysResult orbis::sys_osem_open(Thread *thread,
auto sem = thread->tproc->context->findSemaphore(_name);
if (sem == nullptr) {
// FIXME: hack :)
return sys_osem_create(thread, name, kSemaAttrShared, 0, 10000);
if (std::string_view(_name).starts_with("SceLncSuspendBlock")) {
auto result = sys_osem_create(thread, name, kSemaAttrShared, 1, 10000);
ORBIS_LOG_WARNING(__FUNCTION__, _name, result.value(), thread->retval[0]);
return result;
} else {
auto result = sys_osem_create(thread, name, kSemaAttrShared, 0, 10000);
ORBIS_LOG_WARNING(__FUNCTION__, _name, result.value(), thread->retval[0]);
return result;
}
return ErrorCode::SRCH;
}

Expand Down

0 comments on commit 08a097e

Please sign in to comment.