orbis-kernel: allow umtx_cv_wait with abs time
Some checks are pending
Formatting check / formatting-check (push) Waiting to run
Build RPCSX / build-rpcsx (push) Waiting to run

workaround for wrong blockpool protection
This commit is contained in:
DH 2024-11-14 02:03:39 +03:00
parent 6f80249291
commit 00273aa75b
2 changed files with 8 additions and 8 deletions

View File

@ -320,15 +320,13 @@ orbis::ErrorCode orbis::umtx_cv_wait(Thread *thread, ptr<ucond> cv,
ORBIS_LOG_FATAL("umtx_cv_wait: UNKNOWN wflags", wflags);
return ErrorCode::INVAL;
}
if ((wflags & kCvWaitClockId) != 0 && ut + 1 && cv->clockid != 0) {
if ((wflags & kCvWaitClockId) != 0 && ut + 1) {
ORBIS_LOG_WARNING("umtx_cv_wait: CLOCK_ID", wflags, cv->clockid);
// std::abort();
return ErrorCode::NOSYS;
}
if ((wflags & kCvWaitAbsTime) != 0 && ut + 1) {
ORBIS_LOG_WARNING("umtx_cv_wait: ABSTIME unimplemented", wflags);
ORBIS_LOG_WARNING("umtx_cv_wait: ABSTIME", wflags);
auto now = std::chrono::time_point_cast<std::chrono::microseconds>(
std::chrono::high_resolution_clock::now())
std::chrono::steady_clock::now())
.time_since_epoch()
.count();
@ -337,9 +335,6 @@ orbis::ErrorCode orbis::umtx_cv_wait(Thread *thread, ptr<ucond> cv,
} else {
ut = ut - now;
}
std::abort();
return ErrorCode::NOSYS;
}
auto [chain, key, lock] = g_context.getUmtxChain0(thread, cv->flags, cv);

View File

@ -113,6 +113,11 @@ orbis::ErrorCode BlockPoolDevice::map(void **address, std::uint64_t len,
std::int32_t prot, std::int32_t flags,
orbis::Thread *thread) {
ORBIS_LOG_FATAL("blockpool device map", *address, len);
if (prot == 0) {
// FIXME: investigate it
prot = 0x33;
}
auto result = vm::map(*address, len, prot, flags);
if (result == (void *)-1) {